summaryrefslogtreecommitdiffstats
path: root/attach.c
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2009-05-26 17:57:16 +0200
committerRocco Rutte <pdmef@gmx.net>2009-05-26 17:57:16 +0200
commit00ca07c97c2a073162728c4fc63376c55552febe (patch)
treee625883430577b6de137fc8d03fc0f045ad5148b /attach.c
parentdfedf54d6634c4407387a4eac91b84417b8f0686 (diff)
Use charset parameter to view text attachments using <view-attach>. Closes #3234.
Diffstat (limited to 'attach.c')
-rw-r--r--attach.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/attach.c b/attach.c
index 2eb23178..106d68f1 100644
--- a/attach.c
+++ b/attach.c
@@ -798,10 +798,12 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr)
else
{
/* In recv mode, extract from folder and decode */
-
+
STATE s;
-
+
memset (&s, 0, sizeof (s));
+ s.flags |= M_CHARCONV;
+
if ((s.fpout = mutt_save_attachment_open (path, flags)) == NULL)
{
mutt_perror ("fopen");
@@ -810,7 +812,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr)
}
fseeko ((s.fpin = fp), m->offset, 0);
mutt_decode_attachment (m, &s);
-
+
if (fclose (s.fpout) != 0)
{
mutt_perror ("fclose");