aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder-summary.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-04-02 17:53:29 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-04-02 17:53:29 +0800
commit392fb3dd96ebd60ead293101ef67449b5c8e2fc9 (patch)
tree77a3c9fe995e73ab20d292e671d46765ee3c5687 /camel/camel-folder-summary.c
parentf739cc56ee5d8cbf878ea2cd232b1d93ec9d2766 (diff)
downloadgsoc2013-evolution-392fb3dd96ebd60ead293101ef67449b5c8e2fc9.tar.gz
gsoc2013-evolution-392fb3dd96ebd60ead293101ef67449b5c8e2fc9.tar.zst
gsoc2013-evolution-392fb3dd96ebd60ead293101ef67449b5c8e2fc9.zip
turn this on, this should always be on, it points to real bugs in the
2004-04-02 Not Zed <NotZed@Ximian.com> * camel-exception.c (w): turn this on, this should always be on, it points to real bugs in the code. * camel-folder-summary.c (summary_build_content_info): dont set attachments if its a signature block. (summary_build_content_info_message): same. svn path=/trunk/; revision=25298
Diffstat (limited to 'camel/camel-folder-summary.c')
-rw-r--r--camel/camel-folder-summary.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index 2ecf0a2603..83c7022c33 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -2050,7 +2050,14 @@ summary_build_content_info(CamelFolderSummary *s, CamelMessageInfo *msginfo, Cam
/* check content type for indexing, then read body */
ct = camel_mime_parser_content_type(mp);
/* update attachments flag as we go */
- if (!camel_content_type_is(ct, "text", "*"))
+ if (camel_content_type_is(ct, "application", "pgp-signature")
+#ifdef ENABLE_SMIME
+ || camel_content_type_is(ct, "application", "x-pkcs7-signature")
+ || camel_content_type_is(ct, "application", "pkcs7-signature")
+#endif
+ )
+ /* TODO: set secured bit */;
+ else if (!camel_content_type_is(ct, "text", "*"))
msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
if (p->index && camel_content_type_is(ct, "text", "*")) {
@@ -2178,6 +2185,7 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
int parts, i;
struct _CamelFolderSummaryPrivate *p = _PRIVATE(s);
CamelMessageContentInfo *info = NULL, *child;
+ CamelContentType *ct;
if (s->build_content)
info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->content_info_new_from_message(s, object);
@@ -2191,10 +2199,18 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
add a reference, probably need fixing for multithreading */
/* check for attachments */
- if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "*")) {
- if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "multipart", "mixed"))
+ ct = ((CamelDataWrapper *)containee)->mime_type;
+ if (camel_content_type_is(ct, "multipart", "*")) {
+ if (camel_content_type_is(ct, "multipart", "mixed"))
msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
- } else if (!camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*"))
+ } else if (camel_content_type_is(ct, "application", "pgp-signature")
+#ifdef ENABLE_SMIME
+ || camel_content_type_is(ct, "application", "x-pkcs7-signature")
+ || camel_content_type_is(ct, "application", "pkcs7-signature")
+#endif
+ ) {
+ /* TODO: signed bit */;
+ } else if (!camel_content_type_is(ct, "text", "*"))
msginfo->flags |= CAMEL_MESSAGE_ATTACHMENTS;
/* using the object types is more accurate than using the mime/types */
@@ -2217,11 +2233,11 @@ summary_build_content_info_message(CamelFolderSummary *s, CamelMessageInfo *msgi
my_list_append((struct _node **)&info->childs, (struct _node *)child);
}
} else if (p->filter_stream
- && camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "*")) {
+ && camel_content_type_is(ct, "text", "*")) {
int html_id = -1, idx_id = -1;
/* pre-attach html filter if required, otherwise just index filter */
- if (camel_content_type_is(CAMEL_DATA_WRAPPER(containee)->mime_type, "text", "html")) {
+ if (camel_content_type_is(ct, "text", "html")) {
if (p->filter_html == NULL)
p->filter_html = camel_mime_filter_html_new();
else