aboutsummaryrefslogtreecommitdiffstats
path: root/em-format
diff options
context:
space:
mode:
Diffstat (limited to 'em-format')
-rw-r--r--em-format/e-mail-parser.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/em-format/e-mail-parser.c b/em-format/e-mail-parser.c
index 608bc467da..84327c8559 100644
--- a/em-format/e-mail-parser.c
+++ b/em-format/e-mail-parser.c
@@ -82,37 +82,29 @@ mail_parser_run (EMailParser *parser,
part_id = g_string_new (".message");
parts = NULL;
- if (!parsers) {
- parts = e_mail_parser_wrap_as_attachment (
- parser, CAMEL_MIME_PART (message),
- NULL, part_id, cancellable);
- } else {
- for (iter = parsers->head; iter; iter = iter->next) {
-
- EMailParserExtension *extension;
+ for (iter = parsers->head; iter; iter = iter->next) {
- if (g_cancellable_is_cancelled (cancellable))
- break;
+ EMailParserExtension *extension;
- extension = iter->data;
- if (!extension)
- continue;
+ if (g_cancellable_is_cancelled (cancellable))
+ break;
- parts = e_mail_parser_extension_parse (
- extension, parser, CAMEL_MIME_PART (message),
- part_id, cancellable);
+ extension = iter->data;
+ if (!extension)
+ continue;
- if (parts != NULL)
- break;
- }
+ parts = e_mail_parser_extension_parse (
+ extension, parser, CAMEL_MIME_PART (message),
+ part_id, cancellable);
- parts = g_slist_prepend (
- parts,
- e_mail_part_new (
- CAMEL_MIME_PART (message),
- ".message"));
+ if (parts != NULL)
+ break;
}
+ parts = g_slist_prepend (
+ parts,
+ e_mail_part_new (CAMEL_MIME_PART (message), ".message"));
+
g_string_free (part_id, TRUE);
return parts;