]> granicus.if.org Git - mutt/commitdiff
Fix attachment forwarding. The leading newline for certain MIME
authorThomas Roessler <roessler@does-not-exist.org>
Wed, 9 Jun 1999 17:10:43 +0000 (17:10 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Wed, 9 Jun 1999 17:10:43 +0000 (17:10 +0000)
boundaries was missing.  *grrrr*

recvattach.c

index 80bc6037d61936b35806994b2b6396b61fc89ef8..83612ca9b1c0e85c83328b7312163e7e23355ede 100644 (file)
@@ -744,14 +744,14 @@ copy_tagged_attachments (FILE *fpout, FILE *fpin, const char *boundary, BODY *bd
 {
   for (; bdy; bdy = bdy->next)
   {
-    if (bdy->tagged)
+    if (bdy->parts)
+      copy_tagged_attachments (fpout, fpin, boundary, bdy->parts);
+    else if (bdy->tagged)
     {
-      fprintf (fpout, "--%s\n", boundary);
+      fprintf (fpout, "\n--%s\n", boundary);
       fseek (fpin, bdy->hdr_offset, 0);
       mutt_copy_bytes (fpin, fpout, bdy->length + bdy->offset - bdy->hdr_offset);
     }
-    else if (bdy->parts)
-      copy_tagged_attachments (fpout, fpin, boundary, bdy->parts);
   }
 }