tracker r3161 - in trunk: . src/tracker-extract



Author: mottela
Date: Wed Apr  1 21:27:02 2009
New Revision: 3161
URL: http://svn.gnome.org/viewvc/tracker?rev=3161&view=rev

Log:
Handle existance of invalid dates in images correctly

Modified:
   trunk/ChangeLog
   trunk/src/tracker-extract/tracker-xmp.c

Modified: trunk/src/tracker-extract/tracker-xmp.c
==============================================================================
--- trunk/src/tracker-extract/tracker-xmp.c	(original)
+++ trunk/src/tracker-extract/tracker-xmp.c	Wed Apr  1 21:27:02 2009
@@ -107,13 +107,14 @@
 	if (append) {
 		gchar *orig;
 
-		if (g_hash_table_lookup_extended (metadata, key, NULL, (gpointer) &orig)) {
+		if ( (orig = g_hash_table_lookup (metadata, key)) ) {
 			gchar   *escaped;
 			gchar  **list;
 			gboolean found = FALSE;
 			guint    i;
 
-			escaped = tracker_escape_metadata (value);			
+			escaped = tracker_escape_metadata (value);
+
 			/* Don't add duplicates. FIXME This is inefficient */
 			list = g_strsplit (orig, "|", -1);			
 			for (i=0; list[i]; i++) {
@@ -121,9 +122,10 @@
 					found = TRUE;
 					break;
 				}
-			}			
+			}
+
 			g_strfreev(list);
-			
+
 			if(!found) {
 				new_value = g_strconcat (orig, "|", escaped, NULL);
 				g_hash_table_insert (metadata, g_strdup (key), new_value);						



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