From: Yubin Ruan Date: Tue, 27 Mar 2018 07:57:44 +0000 (+0800) Subject: Clear the filename of an inline part X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02363a8fa1bf4f935b00a2ee222ed77e606aff3a;p=neomutt Clear the filename of an inline part 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 --- diff --git a/compose.c b/compose.c index c7c543e85..95aa06c60 100644 --- 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); diff --git a/sendlib.c b/sendlib.c index bb8b3c22c..76cb6841d 100644 --- 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)