Don't list images from unknown directories in icon cache
authorLoic Minier <lool@dooz.org>
Sun, 21 Oct 2007 20:05:42 +0000 (22:05 +0200)
committerJeremy Bicha <jbicha@debian.org>
Mon, 16 Apr 2018 23:55:32 +0000 (00:55 +0100)
After GTK+ 2.12.0, gtk-update-icon-cache fails if there is a PNG file
placed directly in /usr/share/icons/hicolor (not in a correct
subdirectory like 48x48/apps).

TODO: This is believed to have been fixed differently upstream, so maybe
this change is no longer necessary:
"I believe a slightly different fix that I did some time ago fixes this
too." --Matthias Clasen, 2008-02-16 04:43:10 UTC

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=451634
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=444285
Forwarded: yes
Applied-upstream: no

Gbp-Pq: Name 060_ignore-random-icons.patch

gtk/updateiconcache.c

index b48eaca8044b3f9da53ff0f0d27fd1820a7ccf4c..6f76b6acc4a3e62bf1097ae57daedb8298b8f0fc 100644 (file)
@@ -676,7 +676,7 @@ scan_directory (const gchar *base_path,
                      directories = g_list_append (directories, g_strdup (subdir));
                    }
                  else
-                   dir_index = 0xffff;
+                   continue;
                }
 
              image = g_new0 (Image, 1);