]> granicus.if.org Git - neomutt/commitdiff
fcc_attach: Don't ask every time
authorBertram Scharpf <software@bertram-scharpf.de>
Sun, 17 Jun 2018 09:06:58 +0000 (11:06 +0200)
committerRichard Russon <rich@flatcap.org>
Sun, 17 Jun 2018 09:06:58 +0000 (10:06 +0100)
Option fcc_attach used to ask in any case, if there were attachment nad if there weren't.
In case there is no attachment, there is no need to ask.

send.c

diff --git a/send.c b/send.c
index d697a8165faa87f565ce9861db097746d0b25a88..28b6b0abdabaf8f1bf7df2861ad584afd874b068 100644 (file)
--- a/send.c
+++ b/send.c
@@ -2052,14 +2052,14 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
       msg->content = clear_content;
 
     /* check to see if the user wants copies of all attachments */
-    if (query_quadoption(FccAttach, _("Save attachments in Fcc?")) != MUTT_YES &&
-        msg->content->type == TYPEMULTIPART)
+    if (msg->content->type == TYPEMULTIPART)
     {
       if ((WithCrypto != 0) && (msg->security & (ENCRYPT | SIGN)) &&
           ((mutt_str_strcmp(msg->content->subtype, "encrypted") == 0) ||
            (mutt_str_strcmp(msg->content->subtype, "signed") == 0)))
       {
-        if (clear_content->type == TYPEMULTIPART)
+        if (clear_content->type == TYPEMULTIPART &&
+              query_quadoption(FccAttach, _("Save attachments in Fcc?")) == MUTT_NO)
         {
           if (!(msg->security & ENCRYPT) && (msg->security & SIGN))
           {
@@ -2085,7 +2085,10 @@ int ci_send_message(int flags, struct Header *msg, char *tempfile,
         }
       }
       else
-        msg->content = msg->content->parts;
+      {
+        if (query_quadoption(FccAttach, _("Save attachments in Fcc?")) == MUTT_NO)
+          msg->content = msg->content->parts;
+      }
     }
 
   full_fcc: