|
|
a6dfa2 |
diff -up evolution-mapi-3.8.5/src/libexchangemapi/e-mapi-mail-utils.c.message-attachment-read evolution-mapi-3.8.5/src/libexchangemapi/e-mapi-mail-utils.c
|
|
|
a6dfa2 |
--- evolution-mapi-3.8.5/src/libexchangemapi/e-mapi-mail-utils.c.message-attachment-read 2013-08-06 11:36:04.000000000 +0200
|
|
|
a6dfa2 |
+++ evolution-mapi-3.8.5/src/libexchangemapi/e-mapi-mail-utils.c 2013-09-13 15:25:35.174418025 +0200
|
|
|
a6dfa2 |
@@ -382,7 +382,7 @@ classify_attachments (EMapiConnection *c
|
|
|
a6dfa2 |
const uint32_t *ui32;
|
|
|
a6dfa2 |
uint64_t data_cb = 0;
|
|
|
a6dfa2 |
const uint8_t *data_lpb = NULL;
|
|
|
a6dfa2 |
- gboolean is_apple;
|
|
|
a6dfa2 |
+ gboolean is_apple, is_message;
|
|
|
a6dfa2 |
guint32 apple_data_len = 0, apple_resource_len = 0;
|
|
|
a6dfa2 |
|
|
|
a6dfa2 |
if (!e_mapi_attachment_get_bin_prop (attach, PidTagAttachDataBinary, &data_cb, &data_lpb) && !attach->embedded_object) {
|
|
|
a6dfa2 |
@@ -394,12 +394,14 @@ classify_attachments (EMapiConnection *c
|
|
|
a6dfa2 |
|
|
|
a6dfa2 |
/* Content-Type */
|
|
|
a6dfa2 |
ui32 = e_mapi_util_find_array_propval (&attach->properties, PidTagAttachMethod);
|
|
|
a6dfa2 |
- if (ui32 && *ui32 == ATTACH_EMBEDDED_MSG) {
|
|
|
a6dfa2 |
+ is_message = ui32 && *ui32 == ATTACH_EMBEDDED_MSG;
|
|
|
a6dfa2 |
+ if (is_message) {
|
|
|
a6dfa2 |
mime_type = "message/rfc822";
|
|
|
a6dfa2 |
} else {
|
|
|
a6dfa2 |
mime_type = e_mapi_util_find_array_propval (&attach->properties, PidTagAttachMimeTag);
|
|
|
a6dfa2 |
if (!mime_type)
|
|
|
a6dfa2 |
mime_type = "application/octet-stream";
|
|
|
a6dfa2 |
+ is_message = g_ascii_strcasecmp (mime_type, "message/rfc822") == 0;
|
|
|
a6dfa2 |
}
|
|
|
a6dfa2 |
|
|
|
a6dfa2 |
if (is_apple) {
|
|
|
a6dfa2 |
@@ -584,7 +586,7 @@ classify_attachments (EMapiConnection *c
|
|
|
a6dfa2 |
content_type = camel_mime_part_get_content_type (part);
|
|
|
a6dfa2 |
if (content_type && camel_content_type_is (content_type, "text", "*"))
|
|
|
a6dfa2 |
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_QUOTEDPRINTABLE);
|
|
|
a6dfa2 |
- else if (!ui32 || *ui32 != ATTACH_EMBEDDED_MSG)
|
|
|
a6dfa2 |
+ else if (!is_message)
|
|
|
a6dfa2 |
camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_BASE64);
|
|
|
a6dfa2 |
}
|
|
|
a6dfa2 |
|