diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-02-04 11:20:45 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-02-04 11:20:45 +0000 |
commit | 76ea47a1427257bd85b365dcee6a4ec48eb06830 (patch) | |
tree | 13feacca6597229508830057e478a8aabead97bb /mx.c | |
parent | 44fb9c0a41e20ad339e03714b270d00f0180b196 (diff) |
[unstable] Check for write errors when moving messages to $mbox.
Diffstat (limited to 'mx.c')
-rw-r--r-- | mx.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -807,9 +807,16 @@ int mx_close_mailbox (CONTEXT *ctx) { if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted) { - mutt_append_message (&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN); - ctx->hdrs[i]->deleted = 1; - ctx->deleted++; + if (mutt_append_message (&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0) + { + ctx->hdrs[i]->deleted = 1; + ctx->deleted++; + } + else + { + mx_close_mailbox (&f); + return -1; + } } } |