[file-roller] file-roller shows duplicate folders



commit ee2056c8f99afb9c6530716a4d22be5e4a5e7a35
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Sep 23 10:41:01 2011 +0200

    file-roller shows duplicate folders
    
    Do not free the hash keys after adding them to the hash table, free them
    only when the hash table is destroyed.
    
    [code freeze break approved by the release team]
    
    [bug #659906]

 src/fr-window.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index 8593ab8..7d45bcf 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -1165,8 +1165,6 @@ compute_file_list_name (FrWindow   *window,
 			fdata->list_dir = TRUE;
 		file_data_set_list_name (fdata, dir_name);
 		fdata->dir_size = get_dir_size (window, current_dir, dir_name);
-
-		g_free (dir_name);
 	}
 
 	return TRUE;
@@ -1187,7 +1185,7 @@ fr_window_compute_list_names (FrWindow  *window,
 
 	current_dir = fr_window_get_current_location (window);
 	current_dir_len = strlen (current_dir);
-	names_hash = g_hash_table_new (g_str_hash, g_str_equal);
+	names_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 
 	for (i = 0; i < files->len; i++) {
 		FileData *fdata = g_ptr_array_index (files, i);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]