]> granicus.if.org Git - mutt/commitdiff
Fix send-mode printing when expand_filename() returns 1.
authorKevin McCarthy <kevin@8t8.us>
Sat, 22 Jun 2019 17:09:02 +0000 (10:09 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sat, 22 Jun 2019 17:09:02 +0000 (10:09 -0700)
It will return this when a nametemplate entry already matched the
passed in filename.  So this bug required both a print entry and an
already matching nametemplate entry to trigger.

attach.c

index 68a01d72bd00af5dfce0502daad51b2ccb86150a..9006684c33d9571b578c899ea5d86f9f32e669c2 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -966,6 +966,8 @@ int mutt_print_attachment (FILE *fp, BODY *a)
          unlink_newfile = 1;
       }
     }
+    else if (!fp) /* send case */
+      mutt_buffer_strcpy (newfile, a->filename);
 
     /* in recv mode, save file to newfile first */
     if (fp)