Fix #130: Doubled path in thumbnail preferences
[geeqie.git] / src / cache_maint.c
index 230ce10..2e5a7bb 100644 (file)
@@ -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);