From: Colin Clark Date: Sun, 26 Mar 2017 10:42:10 +0000 (+0100) Subject: Fix #130: Doubled path in thumbnail preferences X-Git-Tag: v1.4~195 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=acb881988e884319771e27a608fbde93f0a8194b Fix #130: Doubled path in thumbnail preferences https://github.com/BestImageViewer/geeqie/issues/130 --- diff --git a/src/cache_maint.c b/src/cache_maint.c index 230ce10c..2e5a7bbf 100644 --- a/src/cache_maint.c +++ b/src/cache_maint.c @@ -1042,11 +1042,8 @@ static GtkWidget *cache_manager_location_label(GtkWidget *group, const gchar *su { GtkWidget *label; gchar *buf; - gchar *path; - path = g_build_filename(homedir(), subdir, NULL); - buf = g_strdup_printf(_("Location: %s"), path); - g_free(path); + buf = g_strdup_printf(_("Location: %s"), subdir); label = pref_label_new(group, buf); g_free(buf); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); @@ -1061,6 +1058,7 @@ void cache_manager_show(void) GtkWidget *button; GtkWidget *table; GtkSizeGroup *sizegroup; + gchar *path; if (cache_manager) { @@ -1105,7 +1103,9 @@ void cache_manager_show(void) group = pref_group_new(gd->vbox, FALSE, _("Shared thumbnail cache"), GTK_ORIENTATION_VERTICAL); - cache_manager_location_label(group, THUMB_FOLDER_GLOBAL); + path = g_build_filename(homedir(), THUMB_FOLDER_GLOBAL, NULL); + cache_manager_location_label(group, path); + g_free(path); table = pref_table_new(group, 2, 2, FALSE, FALSE);