mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Bug 1227761 - Fix logic error in BuildAttachmentList().
First attachment cannot be saved if MIME message has no body part. Tag #1273
This commit is contained in:
parent
87e80be2d1
commit
f14a669d8b
1 changed files with 8 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue