tracker r2302 - in trunk: . src/tracker-indexer/modules



Author: carlosg
Date: Fri Oct  3 09:48:25 2008
New Revision: 2302
URL: http://svn.gnome.org/viewvc/tracker?rev=2302&view=rev

Log:
2008-10-03  Carlos Garnacho  <carlos imendio com>

        * src/tracker-indexer/modules/evolution.c (extract_message_text): Just
        try to convert if part contents don't validate as utf8.


Modified:
   trunk/ChangeLog
   trunk/src/tracker-indexer/modules/evolution.c

Modified: trunk/src/tracker-indexer/modules/evolution.c
==============================================================================
--- trunk/src/tracker-indexer/modules/evolution.c	(original)
+++ trunk/src/tracker-indexer/modules/evolution.c	Fri Oct  3 09:48:25 2008
@@ -1478,6 +1478,16 @@
         }
 
         content = g_mime_part_get_content (GMIME_PART (object), &len);
+
+        if (!content) {
+                return;
+        }
+
+        if (g_utf8_validate (content, len, NULL)) {
+                g_string_append_len (body, content, (gssize) len);
+                return;
+        }
+
         encoding = get_object_encoding (object);
 
         if (!encoding) {



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