]> granicus.if.org Git - neomutt/commitdiff
forgotten-attachment: Fix checking logic.
authorSteven! Ragnarök <steven@nuclearsandwich.com>
Tue, 18 Oct 2016 20:45:26 +0000 (16:45 -0400)
committerRichard Russon <rich@flatcap.org>
Wed, 19 Oct 2016 23:44:31 +0000 (00:44 +0100)
Don't bother searching the email for attachment keywords, if:
- The feature is disabled
- There's an attachment

send.c

diff --git a/send.c b/send.c
index 7f5d1371adeda04277109f86b8939eaef70a0cca..55f626edac045b79382caeb825ad1e0967eabb64 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1895,8 +1895,9 @@ main_loop:
   }
 #endif
 
-  if (mutt_search_attach_keyword (msg->content->filename) &&
+  if (quadoption(OPT_ATTACH) != MUTT_NO &&
          !msg->content->next &&
+         mutt_search_attach_keyword (msg->content->filename) &&
          query_quadoption (OPT_ATTACH, _("No attachments, cancel sending?")) != MUTT_NO)
   {
     /* if the abort is automatic, print an error message */