(Patch) Better detection of attachments



	Hi,

	This simple change includes a slightly better heuristic for detecting
attachments. If an attachment is marked as inline, but it includes a
filename= string, then we consider this as an attachment.

Changelog entry:
* libtinymail-camel/tny-camel-mime-part.c:
        * (tny_camel_mime_part_is_attachment_default): consider as
          attachments parts that have filename= in disposition even
          if they're "inline".

-- 
José Dapena Paz <jdapena igalia com>
Igalia
Index: libtinymail-camel/tny-camel-mime-part.c
===================================================================
--- libtinymail-camel/tny-camel-mime-part.c	(revision 3616)
+++ libtinymail-camel/tny-camel-mime-part.c	(working copy)
@@ -618,10 +618,10 @@
 	 * not actually have this header, as not all E-mail clients add it) */
 
 	if (contdisp) {
-		if (camel_strstrcase (contdisp, "inline"))
-			return FALSE;
 		if (camel_strstrcase (contdisp, "attachment"))
 			return TRUE;
+		if (camel_strstrcase (contdisp, "inline") && (camel_strstrcase (contdisp, "filename=") == NULL))
+			return FALSE;
 	}
 
 	/* Check the old fashioned way */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]