file-roller r2214 - in trunk: . src



Author: paobac
Date: Sat Apr  5 11:43:32 2008
New Revision: 2214
URL: http://svn.gnome.org/viewvc/file-roller?rev=2214&view=rev

Log:
2008-04-05  Paolo Bacchilega  <paobac svn gnome org>

	ported from the gnome-2-22 branch:

	* src/fr-archive.c (fr_archive_extract_to_local):
 	  	 
	Sort the filtered list before removing the files contained in the 
	extracted directories.  The sorting makes the remove much faster.
 	  	 
	Compute the number of files to be extracted before modifing the list.


Modified:
   trunk/ChangeLog
   trunk/src/fr-archive.c

Modified: trunk/src/fr-archive.c
==============================================================================
--- trunk/src/fr-archive.c	(original)
+++ trunk/src/fr-archive.c	Sat Apr  5 11:43:32 2008
@@ -2636,8 +2636,6 @@
 {
 	GList *scan;
 
-	fr_command_set_n_files (command, g_list_length (file_list));
-
 	if (file_list == NULL) {
 		fr_command_extract (command,
 				    file_list,
@@ -2870,6 +2868,8 @@
 		file_list_created = TRUE;
 	}
 
+	fr_command_set_n_files (command, g_list_length (file_list));
+
 	use_base_dir = ! ((base_dir == NULL)
 			  || (strcmp (base_dir, "") == 0)
 			  || (strcmp (base_dir, "/") == 0));
@@ -2884,6 +2884,7 @@
 		if (! extract_all && archive_type_has_issues_extracting_non_empty_folders (archive)) {
 			created_filtered_list = TRUE;
 			filtered = g_list_copy (file_list);
+			filtered = g_list_sort (filtered, (GCompareFunc) strcmp);
 			for (scan = filtered; scan; /* empty */) {  
 				gboolean changed = FALSE;
 				



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