From d03a5fb35c5733a3f33999103d2a55e7f4080012 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 5 Feb 2008 22:20:12 +0000 Subject: [PATCH] Ignore images in the toplevel theme directory, avoiding one source of 2008-02-05 Matthias Clasen * gtk/updateiconcache.c: Ignore images in the toplevel theme directory, avoiding one source of invalid caches that has been spotted in the wild. svn path=/trunk/; revision=19466 --- ChangeLog | 6 ++++++ gtk/updateiconcache.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 56c7863d3..9ea889b74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-02-05 Matthias Clasen + + * gtk/updateiconcache.c: Ignore images in the toplevel theme + directory, avoiding one source of invalid caches that has been + spotted in the wild. + 2008-02-05 Matthias Clasen * gtk/updateiconcache.c: Fix the previous commit to compile. diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index 84fd0e007..f67210b9c 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -623,6 +623,10 @@ scan_directory (const gchar *base_path, continue; } + /* ignore images in the toplevel directory */ + if (subdir == NULL) + continue; + retval = g_file_test (path, G_FILE_TEST_IS_REGULAR); if (retval) { @@ -1473,7 +1477,7 @@ build_cache (const gchar *path) if (!validate_file (tmp_cache_path)) { g_printerr (_("The generated cache was invalid.\n")); - g_unlink (tmp_cache_path); + //g_unlink (tmp_cache_path); exit (1); }