X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hdrline.c;fp=hdrline.c;h=bd83a437daa3decd3a4775f16762884e2c5003b3;hp=d120175aa57faa7ebcb019ad1160e8ade8a65b6d;hb=d2facf5ade8ae6d0831a2b8496b2c1017a935172;hpb=710039d784d5fbda9371cd1d94f61ed5ff799216 diff --git a/hdrline.c b/hdrline.c index d120175..bd83a43 100644 --- a/hdrline.c +++ b/hdrline.c @@ -633,14 +633,12 @@ static const char *hdr_format_str (char *dest, case 'X': { - int count, flags = 0; - - if (hdr->content->parts) - count = mutt_count_body_parts(hdr, flags); - else { - mutt_parse_mime_message(ctx, hdr); - count = mutt_count_body_parts(hdr, flags); - mutt_free_body(&hdr->content->parts); + int count = 0; + + if (option (OPTCOUNTATTACH)) { + if (!hdr->content->parts) + mutt_parse_mime_message(ctx, hdr); + count = mutt_count_body_parts(hdr, 0); } /* The recursion allows messages without depth to return 0. */