diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index acd13e0eed..3225567fb9 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3398,7 +3398,9 @@ theme_subdir_load (GtkIconTheme *icon_theme, { for (d = icon_theme->priv->resource_paths; d; d = d->next) { - full_dir = g_build_filename ((const gchar *)d->data, subdir, NULL); + /* Force a trailing / here, to avoid extra copies in GResource */ + full_dir = g_build_filename ((const gchar *)d->data, subdir, " ", NULL); + full_dir[strlen (full_dir) - 1] = '\0'; dir = g_new0 (IconThemeDir, 1); dir->type = type; dir->is_resource = TRUE;