diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-02-02 17:38:20 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-02-02 17:38:20 +0000 |
commit | 283a092fbaf114fbb6cadf99247a79c42d306102 (patch) | |
tree | d47aa6702d0d5de7536aa6beb23275786a9681b6 /attach.c | |
parent | be3b539741a3293ea5369c6817b2fbad28628c51 (diff) |
[unstable] Fix mutt_decode_save_attachment's handling of character
set conversions.
Diffstat (limited to 'attach.c')
-rw-r--r-- | attach.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -760,7 +760,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) /* returns 0 on success, -1 on error */ int mutt_decode_save_attachment (FILE *fp, BODY *m, char *path, - int displaying, int flags) + int displaying, int flags) { STATE s; unsigned int saved_encoding = 0; @@ -768,7 +768,7 @@ int mutt_decode_save_attachment (FILE *fp, BODY *m, char *path, HEADER *saved_hdr = NULL; memset (&s, 0, sizeof (s)); - s.flags = M_CHARCONV | (displaying ? M_DISPLAY : 0); + s.flags = (displaying ? M_DISPLAY : 0); if (flags == M_SAVE_APPEND) s.fpout = safe_fopen (path, "a"); @@ -806,9 +806,16 @@ int mutt_decode_save_attachment (FILE *fp, BODY *m, char *path, saved_parts = m->parts; saved_hdr = m->hdr; mutt_parse_part (s.fpin, m); + + /* display a readable version to the user */ + if (m->noconv) + s.flags |= M_CHARCONV; } else + { s.fpin = fp; + s.flags |= M_CHARCONV; + } mutt_body_handler (m, &s); |