diff options
author | Kevin McCarthy <kevin@8t8.us> | 2020-05-08 12:10:51 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2020-05-08 12:10:51 -0700 |
commit | 094a07fc9dde6cd795a4bf7878d1d51a7a38a94a (patch) | |
tree | 649e2fb9dbd08418ad6f96b6e171597491b96ea4 /editmsg.c | |
parent | 51ed59a7177c943a66b6695941610b9c4ac4a7bf (diff) |
Fix rc error setting in edit_one_message().
In a couple places, the rc was not set before bailing on an error.
With a default of 0, the original message would be marked for
delete/purge.
Diffstat (limited to 'editmsg.c')
-rw-r--r-- | editmsg.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -110,6 +110,7 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur) if (sb.st_size != 0 && truncate (mutt_b2s (tmp), sb.st_size - 1) == -1) { + rc = -1; mutt_error (_("could not truncate temporary mail folder: %s"), strerror (errno)); goto bail; @@ -178,6 +179,7 @@ static int edit_one_message (CONTEXT *ctx, HEADER *cur) if (msg == NULL) { + rc = -1; mutt_error (_("Can't append to folder: %s"), strerror (errno)); mx_close_mailbox (&tmpctx, NULL); goto bail; |