[Commits] [SCM] claws branch, gtk3, updated. 3.99.0-66-g2930d4ae1

paul at claws-mail.org paul at claws-mail.org
Mon Mar 29 14:45:09 CEST 2021


The branch, gtk3 has been updated
       via  2930d4ae174e1b3711cfdf87d1db796174ce492f (commit)
      from  fe623589e667c009b91196b8d6c6e9b744a18251 (commit)

Summary of changes:
 src/folder.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit 2930d4ae174e1b3711cfdf87d1db796174ce492f
Author: paul <paul at claws-mail.org>
Date:   Mon Mar 29 13:45:04 2021 +0100

    revert commit b0cdffc33ff9c292c480f5c24d81d2d3eea05058 as its producing false positives

diff --git a/src/folder.c b/src/folder.c
index 79bbf8d85..b7a0d47a4 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -2864,9 +2864,8 @@ static void msginfo_set_mime_flags(GNode *node, gpointer data)
 	MsgInfo *msginfo = data;
 	MimeInfo *mimeinfo = node->data;
 	
-	if ((mimeinfo->disposition == DISPOSITIONTYPE_ATTACHMENT ||
-	     mimeinfo->disposition == DISPOSITIONTYPE_INLINE)
-	 && (!mimeinfo->subtype || (strcmp(mimeinfo->subtype, "pgp-signature") &&
+	if (mimeinfo->disposition == DISPOSITIONTYPE_ATTACHMENT &&
+	    (!mimeinfo->subtype || (strcmp(mimeinfo->subtype, "pgp-signature") &&
 	     strcmp(mimeinfo->subtype, "x-pkcs7-signature") &&
 	     strcmp(mimeinfo->subtype, "pkcs7-signature")))) {
 		procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT);
@@ -2879,6 +2878,14 @@ static void msginfo_set_mime_flags(GNode *node, gpointer data)
 		    strcmp(mimeinfo->subtype, "x-pkcs7-signature") &&
 		    strcmp(mimeinfo->subtype, "pkcs7-signature")))
 			procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT);
+	} else if (mimeinfo->disposition == DISPOSITIONTYPE_INLINE &&
+		 mimeinfo->id == NULL &&
+		(strcmp(mimeinfo->subtype, "pgp-signature") &&
+		 strcmp(mimeinfo->subtype, "x-pkcs7-signature") &&
+		 strcmp(mimeinfo->subtype, "pkcs7-signature")) && 
+		(procmime_mimeinfo_get_parameter(mimeinfo, "name") != NULL ||
+		 procmime_mimeinfo_get_parameter(mimeinfo, "filename") != NULL)) {
+		procmsg_msginfo_set_flags(msginfo, 0, MSG_HAS_ATTACHMENT);
 	}
 
 	/* don't descend below top level message for signed and encrypted info */

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list