X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=handler.c;h=51f4c32c56e7c7be0afcfc4dd1f115c5812afe92;hp=0f37639659b29a82e45fdcae79361e84262e156c;hb=4e64abbe6c52d61bb01b85c266e33e30b257ba68;hpb=3766db5f849cea008b1cd3d532c712aeb17aa062 diff --git a/handler.c b/handler.c index 0f37639..51f4c32 100644 --- a/handler.c +++ b/handler.c @@ -1250,12 +1250,11 @@ void mutt_decode_attachment (BODY * b, STATE * s) if (s->flags & M_CHARCONV) { const char *charset = parameter_getval(b->parameter, "charset"); - if (!option (OPTSTRICTMIME) && !charset) + if (!charset) charset = charset_getfirst(AssumedCharset); if (charset && Charset) cd = mutt_iconv_open (Charset, charset, M_ICONV_HOOK_FROM); - } - else { + } else { if (b->file_charset) cd = mutt_iconv_open (Charset, b->file_charset, M_ICONV_HOOK_FROM); } @@ -1415,7 +1414,7 @@ int mutt_body_handler (BODY * b, STATE * s) if (decode) { b->length = ftello (s->fpout); b->offset = 0; - fclose (s->fpout); + m_fclose(&s->fpout); /* restore final destination and substitute the tempfile for input */ s->fpout = fp; @@ -1439,7 +1438,7 @@ int mutt_body_handler (BODY * b, STATE * s) b->offset = tmpoffset; /* restore the original source stream */ - fclose (s->fpin); + m_fclose(&s->fpin); s->fpin = fp; } }