[evolution-data-server] Bug 767807 - Inline non-text/image attachments hidden in message list
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug 767807 - Inline non-text/image attachments hidden in message list
- Date: Thu, 20 Oct 2016 12:04:11 +0000 (UTC)
commit 9d35ee89d8e9c3a2474c11de95a08e92b45f1d98
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 20 14:01:54 2016 +0200
Bug 767807 - Inline non-text/image attachments hidden in message list
src/camel/camel-mime-message.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-mime-message.c b/src/camel/camel-mime-message.c
index d41b030..8f32c67 100644
--- a/src/camel/camel-mime-message.c
+++ b/src/camel/camel-mime-message.c
@@ -1306,7 +1306,17 @@ find_attachment (CamelMimeMessage *msg,
*found = (cd->disposition && g_ascii_strcasecmp (cd->disposition, "attachment") == 0);
- if (!*found && (!cd->disposition || g_ascii_strcasecmp (cd->disposition, "inline") != 0)) {
+ /* If the Content-Disposition isn't an attachment, then call everything with a "filename"
+ parameter an attachment, but only if there is no Content-Disposition header, or it's
+ not the "inline" or it's neither text/... nor image/... Content-Type, which can be usually
+ shown in the UI inline.
+
+ The test for Content-Type was added for Apple Mail, which marks also for example .pdf
+ attachments as 'inline', which broke the previous logic here.
+ */
+ if (!*found && (!cd->disposition ||
+ g_ascii_strcasecmp (cd->disposition, "inline") != 0 ||
+ (!camel_content_type_is (ct, "text", "*") && !camel_content_type_is (ct, "image", "*"))))
{
for (param = cd->params; param && !(*found); param = param->next) {
if (param->name && param->value && *param->value && g_ascii_strcasecmp
(param->name, "filename") == 0)
*found = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]