Changeset 1546:c0fff2f75b8c for attach.c

Show
Ignore:
Timestamp:
2000-02-17 10:00:38 (9 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Do more error checking when writing messages to folders.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • attach.c

    r1520 r1546  
    703703        chflags = CH_FROM; 
    704704      chflags |= (ctx.magic == M_MAILDIR ? CH_NOSTATUS : CH_UPDATE); 
    705       if ((r = _mutt_copy_message (msg->fp, fp, hn, hn->content, 0, chflags)) == 0) 
     705      if (_mutt_copy_message (msg->fp, fp, hn, hn->content, 0, chflags) == 0  
     706          && mx_commit_message (msg, &ctx) == 0) 
    706707        mutt_message _("Attachment saved."); 
    707  
    708       mx_commit_message (msg, &ctx); 
     708      else 
     709        r = -1; 
     710 
    709711      mx_close_message (&msg); 
    710712      mx_close_mailbox (&ctx);