gtk+ r20865 - in trunk: . gtk



Author: federico
Date: Fri Jul 18 19:28:13 2008
New Revision: 20865
URL: http://svn.gnome.org/viewvc/gtk+?rev=20865&view=rev

Log:
Remove the old icon cache if regenerating it would cause it to be empty

Signed-off-by: Federico Mena Quintero <federico novell com>


Modified:
   trunk/ChangeLog
   trunk/gtk/updateiconcache.c

Modified: trunk/gtk/updateiconcache.c
==============================================================================
--- trunk/gtk/updateiconcache.c	(original)
+++ trunk/gtk/updateiconcache.c	Fri Jul 18 19:28:13 2008
@@ -1448,6 +1448,7 @@
 #endif
 
   tmp_cache_path = g_build_filename (path, "."CACHE_NAME, NULL);
+  cache_path = g_build_filename (path, CACHE_NAME, NULL);
 
   if ((fd = g_open (tmp_cache_path, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC | _O_BINARY, mode)) == -1)
     {
@@ -1476,6 +1477,7 @@
 
       fclose (cache);
       g_unlink (tmp_cache_path);
+      g_unlink (cache_path);
       exit (0);
     }
     
@@ -1499,8 +1501,6 @@
       exit (1);
     }
 
-  cache_path = g_build_filename (path, CACHE_NAME, NULL);
-
 #ifdef G_OS_WIN32
   if (g_file_test (cache_path, G_FILE_TEST_EXISTS))
     {



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