From: Kevin McCarthy Date: Wed, 19 Dec 2018 22:35:22 +0000 (-0800) Subject: Move fcc after send X-Git-Tag: 2019-10-25~396^2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59c60f14bc58185bbe3e71c9494f466cb7cbee91;p=neomutt Move fcc after send Co-authored-by: Richard Russon --- diff --git a/send.c b/send.c index 952b63bb1..25ca2d5c2 100644 --- a/send.c +++ b/send.c @@ -1616,7 +1616,6 @@ int ci_send_message(int flags, struct Email *msg, const char *tempfile, struct Body *pbody = NULL; int i; bool killfrom = false; - bool fcc_error = false; bool free_clear_content = false; struct Body *clear_content = NULL; @@ -2137,7 +2136,6 @@ int ci_send_message(int flags, struct Email *msg, const char *tempfile, { main_loop: - fcc_error = false; /* reset value since we may have failed before */ mutt_pretty_mailbox(fcc, sizeof(fcc)); i = mutt_compose_menu(msg, fcc, sizeof(fcc), cur, ((flags & SEND_NO_FREE_HEADER) ? MUTT_COMPOSE_NOFREEHEADER : 0)); @@ -2340,14 +2338,8 @@ int ci_send_message(int flags, struct Email *msg, const char *tempfile, mutt_prepare_envelope(msg->env, true); - fcc_error = (save_fcc(msg, fcc, sizeof(fcc), clear_content, pgpkeylist, flags, - &finalpath) < 0); - - /* Don't attempt to send the message if the FCC failed. Just pretend - * the send failed as well so we give the user a chance to fix the - * error. - */ - if (fcc_error || (i = send_message(msg)) < 0) + i = send_message(msg); + if (i < 0) { if (!(flags & SEND_BATCH)) { @@ -2388,6 +2380,8 @@ int ci_send_message(int flags, struct Email *msg, const char *tempfile, #endif } + save_fcc(msg, fcc, sizeof(fcc), clear_content, pgpkeylist, flags, &finalpath); + if ((WithCrypto != 0) && (msg->security & ENCRYPT)) FREE(&pgpkeylist);