]> granicus.if.org Git - mutt/commitdiff
Move fcc after send.
authorKevin McCarthy <kevin@8t8.us>
Wed, 19 Dec 2018 22:35:22 +0000 (14:35 -0800)
committerKevin McCarthy <kevin@8t8.us>
Wed, 19 Dec 2018 23:45:23 +0000 (15:45 -0800)
send.c

diff --git a/send.c b/send.c
index 72ec0a4f44b307dc22e06871de0c02174f5bfb5e..7428f622b3613821f75a72b58d7070595701d9ce 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1292,7 +1292,6 @@ ci_send_message (int flags,               /* send mode */
   FILE *tempfp = NULL;
   BODY *pbody;
   int i, killfrom = 0;
-  int fcc_error = 0;
   int free_clear_content = 0;
 
   BODY *clear_content = NULL;
@@ -1749,7 +1748,6 @@ ci_send_message (int flags,               /* send mode */
   {
 main_loop:
 
-    fcc_error = 0; /* reset value since we may have failed before */
     mutt_pretty_mailbox (fcc, sizeof (fcc));
     i = mutt_compose_menu (msg, fcc, sizeof (fcc), cur,
                            (flags & SENDNOFREEHEADER ? MUTT_COMPOSE_NOFREEHEADER : 0));
@@ -1936,16 +1934,7 @@ main_loop:
 
   mutt_prepare_envelope (msg->env, 1);
 
-
-  fcc_error = save_fcc (msg, fcc, sizeof(fcc), clear_content, pgpkeylist, flags);
-
-
-  /*
-   * 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)
+  if ((i = send_message (msg)) < 0)
   {
     if (!(flags & SENDBATCH))
     {
@@ -1978,6 +1967,10 @@ main_loop:
   else if (!option (OPTNOCURSES) && ! (flags & SENDMAILX))
     mutt_message (i == 0 ? _("Mail sent.") : _("Sending in background."));
 
+
+  save_fcc (msg, fcc, sizeof(fcc), clear_content, pgpkeylist, flags);
+
+
   if (WithCrypto && (msg->security & ENCRYPT))
     FREE (&pgpkeylist);