]> granicus.if.org Git - neomutt/commitdiff
Fix #470: multipart- and message-type attachments weren't handled
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 13 Feb 2001 10:54:29 +0000 (10:54 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 13 Feb 2001 10:54:29 +0000 (10:54 +0000)
correctly.

attach.c

index 1a76cf001276229f04b76cc860f644f6194587d2..19503d24c1407a1e5e2dac2d5cbcf004c8258ca8 100644 (file)
--- a/attach.c
+++ b/attach.c
@@ -818,15 +818,16 @@ int mutt_decode_save_attachment (FILE *fp, BODY *m, char *path,
     }
 
     saved_encoding = m->encoding;
+    if (!is_multipart (m))
+      m->encoding = ENC8BIT;
+    
     m->length = st.st_size;
-    m->encoding = ENC8BIT;
     m->offset = 0;
     saved_parts = m->parts;
     saved_hdr = m->hdr;
     mutt_parse_part (s.fpin, m);
 
-    /* display a readable version to the user */
-    if (m->noconv)
+    if (m->noconv || is_multipart (m))
       s.flags |= M_CHARCONV;
   }
   else