]> granicus.if.org Git - neomutt/commitdiff
Clear the filename of an inline part
authorYubin Ruan <ablacktshirt@gmail.com>
Tue, 27 Mar 2018 07:57:44 +0000 (15:57 +0800)
committerRichard Russon <rich@flatcap.org>
Tue, 27 Mar 2018 07:57:44 +0000 (15:57 +0800)
Inline part of a multipart/alternative message no longer have filename

When turning a message into multipart/alternative, all parts
in the bundled message should be "inline" and its corresponding
filename should not be displayed in the header (to avoid some MUA)
treating this part as a downloadable attachment.

Also, since there are handling of `msg->content` at the very end
mutt_compose_menu(), I will safely remove that commented-out line

compose.c
sendlib.c

index c7c543e85ef83d1a7b6bddb760864f48826f23b8..95aa06c600ac5e7410da921083b41d12f7e51d47 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -1159,8 +1159,6 @@ int mutt_compose_menu(struct Header *msg, char *fcc, size_t fcclen,
         group->next = NULL;
         mutt_generate_boundary(&group->parameter);
 
-        /* msg->content = NULL; */
-
         struct AttachPtr *gptr = mutt_mem_calloc(1, sizeof(struct AttachPtr));
         gptr->content = group;
         update_idx(menu, actx, gptr);
index bb8b3c22c26c30ee04c2c481542f2aeed7f1d717..76cb6841df3174092c618bd22348299e07cab334 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -366,7 +366,7 @@ int mutt_write_mime_header(struct Body *a, FILE *f)
     {
       fprintf(f, "Content-Disposition: %s", dispstr[a->disposition]);
 
-      if (a->use_disp)
+      if (a->use_disp && (a->disposition != DISPINLINE))
       {
         char *fn = a->d_filename;
         if (!fn)