[Commits] [SCM] claws branch, master, updated. 3.9.2-89-gde0d6d2

colin at claws-mail.org colin at claws-mail.org
Sun Sep 29 11:02:15 CEST 2013


The branch master of project "claws" (Claws Mail) has been updated
       via  de0d6d263e40307d18966c4fc46460f6bfbef5be (commit)
      from  ec06e2ebb838748dbeb6f40c95482e86e7f62b6e (commit)


- Log -----------------------------------------------------------------
commit de0d6d263e40307d18966c4fc46460f6bfbef5be
Author: Colin Leroy <colin at colino.net>
Date:   Sun Sep 29 11:02:56 2013 +0200

    Fix bug #3004, "claws picks wrong mime type for attachments"
    Use first match for each extension

diff --git a/src/procmime.c b/src/procmime.c
index 4951f3c..43208ed 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -1150,12 +1150,11 @@ static GHashTable *procmime_get_mime_type_table(void)
 
 		exts = g_strsplit(mime_type->extension, " ", 16);
 		for (i = 0; exts[i] != NULL; i++) {
-			/* use previously dup'd key on overwriting */
-			if (g_hash_table_lookup(table, exts[i]))
-				key = exts[i];
-			else
+			/* Don't overwrite previously inserted extension */
+			if (!g_hash_table_lookup(table, exts[i])) {
 				key = g_strdup(exts[i]);
-			g_hash_table_insert(table, key, mime_type);
+				g_hash_table_insert(table, key, mime_type);
+			}
 		}
 		g_strfreev(exts);
 	}

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

Summary of changes:
 src/procmime.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list