diff options
Diffstat (limited to 'mailnews/mime')
-rw-r--r-- | mailnews/mime/src/mimemoz2.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/mailnews/mime/src/mimemoz2.cpp b/mailnews/mime/src/mimemoz2.cpp index 09ac52545..c47c5c8a5 100644 --- a/mailnews/mime/src/mimemoz2.cpp +++ b/mailnews/mime/src/mimemoz2.cpp @@ -529,13 +529,14 @@ BuildAttachmentList(MimeObject *anObject, nsMsgAttachmentData *aAttachData, cons skip = false; if (skip && child->headers) { - char * disp = MimeHeaders_get (child->headers, - HEADER_CONTENT_DISPOSITION, - true, false); - if (MimeHeaders_get_name(child->headers, nullptr) && - (!disp || PL_strcasecmp(disp, "attachment"))) - // it has a filename and isn't being displayed inline - skip = false; + // If it has a filename, we don't skip it regardless of the + // content disposition which can be "inline" or "attachment". + // Inline parts are not shown when attachments aren't displayed + // inline, so the only chance to see the part is as attachment. + char * name = MimeHeaders_get_name(child->headers, nullptr); + if (name) + skip = false; + PR_FREEIF(name); } found_output = true; |