diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2001-05-22 20:51:32 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2001-05-22 20:51:32 +0000 |
commit | 0e5b6ceb4f231cec56cac9dd0c8dec6776981cdf (patch) | |
tree | c8b21e3d888e18e4bb2d13af7f746f7517ea040b | |
parent | 9c8123af1dd2806aec1ecb556ec21595e11f6a31 (diff) |
Attachment deletion on IMAP servers, take two.
-rw-r--r-- | imap/imap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/imap/imap.c b/imap/imap.c index ee5d7039..1ba339d6 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -938,8 +938,14 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint) if (ctx->hdrs[n]->attach_del) { dprint (3, (debugfile, "imap_sync_mailbox: Attachments to be deleted, falling back to _mutt_save_message\n")); - appendctx = mx_open_mailbox (ctx->path, M_APPEND | M_QUIET, NULL); - _mutt_save_message (ctx->hdrs[n], appendctx, 1, 0, 0); + if (!appendctx) + appendctx = mx_open_mailbox (ctx->path, M_APPEND | M_QUIET, NULL); + if (!appendctx) + { + dprint (1, (debugfile, "imap_sync_mailbox: Error opening mailbox in append mode\n")); + } + else + _mutt_save_message (ctx->hdrs[n], appendctx, 1, 0, 0); } flags[0] = '\0'; |