From 251e8b00da7f55c076c67d7a100fd4d7b3375051 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 12 Sep 2012 11:39:14 +0200 Subject: Bug #678291 - Identifies application/mbox as text/plain attachment --- em-format/e-mail-parser-application-mbox.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/em-format/e-mail-parser-application-mbox.c b/em-format/e-mail-parser-application-mbox.c index 500b6bbc1e..d8224e35c1 100644 --- a/em-format/e-mail-parser-application-mbox.c +++ b/em-format/e-mail-parser-application-mbox.c @@ -140,13 +140,17 @@ empe_app_mbox_parse (EMailParserExtension *extension, g_string_append_printf (part_id, ".mbox.%d", messages); + opart = camel_mime_part_new (); + camel_medium_set_content (CAMEL_MEDIUM (opart), CAMEL_DATA_WRAPPER (message)); + camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (opart), "message/rfc822"); + new_parts = e_mail_parser_parse_part_as ( - parser, CAMEL_MIME_PART (message), + parser, opart, part_id, "message/rfc822", cancellable); /* Wrap every message as attachment */ new_parts = e_mail_parser_wrap_as_attachment ( - parser, CAMEL_MIME_PART (message), + parser, opart, new_parts, part_id, cancellable); /* Inline all messages in mbox */ @@ -161,6 +165,7 @@ empe_app_mbox_parse (EMailParserExtension *extension, g_string_truncate (part_id, old_len); g_object_unref (message); + g_object_unref (opart); /* Skip past CAMEL_MIME_PARSER_STATE_FROM_END. */ camel_mime_parser_step (mime_parser, NULL, NULL); -- cgit v1.2.3