tracker r2700 - in trunk: . src/libtracker-common



Author: pvanhoof
Date: Thu Dec 11 10:52:13 2008
New Revision: 2700
URL: http://svn.gnome.org/viewvc/tracker?rev=2700&view=rev

Log:
        * src/libtracker-common/tracker-thumbnailer.c: coping with paths



Modified:
   trunk/ChangeLog
   trunk/src/libtracker-common/tracker-thumbnailer.c

Modified: trunk/src/libtracker-common/tracker-thumbnailer.c
==============================================================================
--- trunk/src/libtracker-common/tracker-thumbnailer.c	(original)
+++ trunk/src/libtracker-common/tracker-thumbnailer.c	Thu Dec 11 10:52:13 2008
@@ -21,6 +21,8 @@
 
 #include "config.h"
 
+#include <string.h>
+
 #include <libtracker-data/tracker-data-metadata.h>
 
 #include <tracker-indexer/tracker-module-file.h>
@@ -471,8 +473,11 @@
 		thumbnailer_request_timeout_cb (NULL);
 	}
 
-	/* Add new URI */
-	private->uris[private->count] = g_strdup (uri);
+	/* Add new URI (detect if we got passed a path) */
+	if (!strstr (uri, ":/"))
+		private->uris[private->count] = g_strdup_printf ("file://", uri);
+	else
+		private->uris[private->count] = g_strdup (uri);
 
 	if (mime_type) {
 		private->mime_types[private->count] = g_strdup (mime_type);



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