When forwarding an attachment with an non-ascii name, mutt_copy_body()
mangles the filename when calling mutt_adv_mktemp. Preserve
the original attachment filename in d_filename.
Remove the double copy of b->filename, which is a memory leak.
b->xtype = safe_strdup (b->xtype);
b->subtype = safe_strdup (b->subtype);
b->form_name = safe_strdup (b->form_name);
- b->filename = safe_strdup (b->filename);
b->d_filename = safe_strdup (b->d_filename);
+ /* mutt_adv_mktemp() will mangle the filename in tmp,
+ * so preserve it in d_filename */
+ if (!b->d_filename && use_disp)
+ b->d_filename = safe_strdup (src->filename);
b->description = safe_strdup (b->description);
/*