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



Author: pvanhoof
Date: Wed Nov  5 12:27:17 2008
New Revision: 2454
URL: http://svn.gnome.org/viewvc/tracker?rev=2454&view=rev

Log:
2008-11-05  Philip Van Hoof  <philip codeminded be>

	* src/tracker-extract/tracker-albumart.c: Saw the hope for change become
	realized and then fixed creating the .mediaartlocal directory for local
	media art on removable devices



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

Modified: trunk/src/tracker-extract/tracker-albumart.c
==============================================================================
--- trunk/src/tracker-extract/tracker-albumart.c	(original)
+++ trunk/src/tracker-extract/tracker-albumart.c	Wed Nov  5 12:27:17 2008
@@ -205,13 +205,21 @@
 		from = g_file_new_for_path (filename);
 		local_file = g_file_new_for_uri (local_uri);
 
+
 		/* We don't try to overwrite, but we also ignore all errors.
 		 * Such an error could be that the removable device is 
 		 * read-only. Well that's fine then ... ignore */
 
-		if (!g_file_query_exists (local_file, NULL))
+		if (!g_file_query_exists (local_file, NULL)) {
+			GFile *dirf;
+
+			dirf = g_file_get_parent (local_file);
+			g_file_make_directory_with_parents (dirf, NULL, NULL);
+			g_object_unref (dirf);
+
 			g_file_copy_async (from, local_file, 0, 0, 
 					   NULL, NULL, NULL, NULL, NULL);
+		}
 
 		g_object_unref (local_file);
 		g_object_unref (from);



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