replace fuzzy-head fix in 3.9.0-196-g06e09c8 with simpler, better, proper fix
authorPaul <paul@claws-mail.org>
Fri, 26 Apr 2013 16:30:34 +0000 (17:30 +0100)
committerPaul <paul@claws-mail.org>
Fri, 26 Apr 2013 16:30:34 +0000 (17:30 +0100)
replace fuzzy-head fix in 3.9.0-196-g06e09c8 with simpler, better, proper fix

Signed-off-by: Paul <paul@claws-mail.org>
src/procmime.c

index 2fe223b9f3b531c9404be0b11ef502765b808b40..e0c2dd163f10085d25abe3a36fb6932477dfcbb0 100644 (file)
@@ -798,16 +798,17 @@ gboolean procmime_scan_text_content(MimeInfo *mimeinfo,
        } else if (mimeinfo->type == MIMETYPE_TEXT) {
                while (SC_FGETS(buf, sizeof(buf), tmpfp) != NULL) {
                        str = conv_codeset_strdup(buf, src_codeset, CS_UTF_8);
-                       if (!str)
-                               str =  conv_codeset_strdup(buf, conv_get_locale_charset_str(), CS_UTF_8);
                        if (str) {
-                               if ((scan_ret = scan_callback(str, cb_data)) == TRUE) {
-                                       g_free(str);
-                                       break;
-                               }
-                               g_free(str);    
-                       } else
+                               if ((scan_ret = scan_callback(str, cb_data)) == TRUE) {
+                                       g_free(str);
+                                       break;
+                               }
+                               g_free(str);
+                       } else {
                                conv_fail = TRUE;
+                               if ((scan_ret = scan_callback(buf, cb_data)) == TRUE)
+                                       break;
+                       }
                }
        }