From e3d725ed8c72db5e1b2edb1d6bc4ffa8945c4a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?= =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= Date: Tue, 15 Jul 2014 16:42:39 +0000 Subject: [PATCH] GktIconTheme: Be even more careful with paths This is a followup for 5a252f13a863c00ccd9901afa110e85836a6af4c https://bugzilla.gnome.org/show_bug.cgi?id=733189 --- gtk/gtkicontheme.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 42cb138087..465970d559 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3025,18 +3025,21 @@ theme_lookup_icon (IconTheme *theme, if (min_dir->dir) { - gchar *uri; - file = g_strconcat (icon_name, string_from_suffix (suffix), NULL); icon_info->filename = g_build_filename (min_dir->dir, file, NULL); + if (min_dir->is_resource) - uri = g_strconcat ("resource://", icon_info->filename, NULL); + { + gchar *uri; + uri = g_strconcat ("resource://", icon_info->filename, NULL); + icon_info->icon_file = g_file_new_for_uri (uri); + g_free (uri); + } else - uri = g_strconcat ("file://", icon_info->filename, NULL); - icon_info->icon_file = g_file_new_for_uri (uri); + icon_info->icon_file = g_file_new_for_path (icon_info->filename); + icon_info->is_svg = suffix == ICON_SUFFIX_SVG; icon_info->is_resource = min_dir->is_resource; - g_free (uri); g_free (file); } else