From 186f5dbd1fc9f5fe3292b5f07277f6d403c5ca99 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 4 Apr 2013 20:44:40 +0200 Subject: Show parts with Content-ID of multipart/mixed as attachments The multipart/mixed should behave differently than multipart/related, because subparts of multipart/mixed are not meant to reference each other by default, thus the subparts should be shown as attachments. This was reported at https://bugzilla.redhat.com/show_bug.cgi?id=947409 --- em-format/e-mail-parser-multipart-mixed.c | 9 ++++++--- em-format/e-mail-parser-multipart-related.c | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'em-format') diff --git a/em-format/e-mail-parser-multipart-mixed.c b/em-format/e-mail-parser-multipart-mixed.c index 1fdfb3cc33..1d14fced68 100644 --- a/em-format/e-mail-parser-multipart-mixed.c +++ b/em-format/e-mail-parser-multipart-mixed.c @@ -83,10 +83,13 @@ empe_mp_mixed_parse (EMailParserExtension *extension, ct = camel_mime_part_get_content_type (subpart); /* Display parts with CID as attachments - * (unless they already are attachments). */ + * (unless they already are attachments). + * Show also hidden attachments with CID, + * because this is multipart/mixed, + * not multipart/related. */ if (mail_part != NULL && - mail_part->cid != NULL && - !mail_part->is_attachment) { + mail_part->cid != NULL && + (!mail_part->is_attachment || mail_part->is_hidden)) { e_mail_parser_wrap_as_attachment ( parser, subpart, part_id, &work_queue); diff --git a/em-format/e-mail-parser-multipart-related.c b/em-format/e-mail-parser-multipart-related.c index e2ed728215..c90e5bf31d 100644 --- a/em-format/e-mail-parser-multipart-related.c +++ b/em-format/e-mail-parser-multipart-related.c @@ -125,7 +125,7 @@ empe_mp_related_parse (EMailParserExtension *extension, for (link = head; link != NULL; link = g_list_next (link)) { EMailPart *mail_part = link->data; - /* Don't render the part on it's own! */ + /* Don't render the part on its own! */ if (e_mail_part_utils_body_refers (html_body, mail_part->cid)) mail_part->is_hidden = TRUE; } -- cgit v1.2.3