]> granicus.if.org Git - mutt/commitdiff
Fix the behaviour when recalling postponed messages: Content types
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 19 Oct 1998 08:41:16 +0000 (08:41 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 19 Oct 1998 08:41:16 +0000 (08:41 +0000)
would not be restored.

postpone.c

index 2eae2d72f0fba156c032b14936b261f35dac4e88..2775b142fc9b48db1af34568ef712c5dec22e876 100644 (file)
@@ -422,6 +422,7 @@ int mutt_edit_message (CONTEXT *ctx, HEADER *newhdr, HEADER *hdr)
       safe_free ((void *) &b->filename);
       b->filename = safe_strdup (file);
       b->unlink = 1;
+      mutt_stamp_attachment (b);
       mutt_free_body (&b->parts);
       b = b->next;
     }
@@ -437,6 +438,14 @@ int mutt_edit_message (CONTEXT *ctx, HEADER *newhdr, HEADER *hdr)
       return (-1);
     }
     newhdr->content = mutt_make_file_attach (file);
+    
+    FREE (&newhddr->content->subtype);
+    FREE (&newhdr->content->xtype);
+    
+    newhdr->content->type = hdr->content->type;
+    newhdr->content->xtype = safe_strdup (hdr->content->xtype);
+    newhdr->content->subtype = safe_strdup (hdr->content->subtype);
+    
     newhdr->content->use_disp = 0;     /* no content-disposition */
     newhdr->content->unlink = 1;       /* delete when we are done */
   }