diff options
author | Matthias Clasen <mclasen@redhat.com> | 2017-11-13 12:12:52 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2017-11-13 12:13:42 -0500 |
commit | 724863c2751a1feb84a89abcd9ec889f57f10f86 (patch) | |
tree | feea81ad5f7b43f0f9c02a3adf355b6f2a9ca360 /gtk/gtkicontheme.c | |
parent | 1b1cb8295b680772ce1eb17e8584fcab93ef5388 (diff) | |
download | gtk+-724863c2751a1feb84a89abcd9ec889f57f10f86.tar.gz |
icontheme: Add a trailing / when enumerating resources
This avoids extra string copies in GResource.
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index fb14e1094a..1dc44a5567 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -3359,7 +3359,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; |