mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-25 16:47:29 +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;
|
skip = false;
|
||||||
if (skip && child->headers)
|
if (skip && child->headers)
|
||||||
{
|
{
|
||||||
char * disp = MimeHeaders_get (child->headers,
|
// If it has a filename, we don't skip it regardless of the
|
||||||
HEADER_CONTENT_DISPOSITION,
|
// content disposition which can be "inline" or "attachment".
|
||||||
true, false);
|
// Inline parts are not shown when attachments aren't displayed
|
||||||
if (MimeHeaders_get_name(child->headers, nullptr) &&
|
// inline, so the only chance to see the part is as attachment.
|
||||||
(!disp || PL_strcasecmp(disp, "attachment")))
|
char * name = MimeHeaders_get_name(child->headers, nullptr);
|
||||||
// it has a filename and isn't being displayed inline
|
if (name)
|
||||||
skip = false;
|
skip = false;
|
||||||
|
PR_FREEIF(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
found_output = true;
|
found_output = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue