summaryrefslogtreecommitdiffstats
path: root/attach.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>2001-02-13 10:54:29 +0000
committerThomas Roessler <roessler@does-not-exist.org>2001-02-13 10:54:29 +0000
commit715dc97d9404e851912c0e0e80dab91029cfd0de (patch)
tree4d273f72be6a9ef74fe04f40a276384dd18169ae /attach.c
parent3d33a265565f2a692e17b958a69fb981c2f88f5b (diff)
Fix #470: multipart- and message-type attachments weren't handled
correctly.
Diffstat (limited to 'attach.c')
-rw-r--r--attach.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/attach.c b/attach.c
index 1a76cf00..19503d24 100644
--- 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