file-roller r2211 - in branches/gnome-2-22: . src



Author: paobac
Date: Fri Apr  4 19:12:51 2008
New Revision: 2211
URL: http://svn.gnome.org/viewvc/file-roller?rev=2211&view=rev

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

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


Modified:
   branches/gnome-2-22/ChangeLog
   branches/gnome-2-22/src/fr-archive.c

Modified: branches/gnome-2-22/src/fr-archive.c
==============================================================================
--- branches/gnome-2-22/src/fr-archive.c	(original)
+++ branches/gnome-2-22/src/fr-archive.c	Fri Apr  4 19:12:51 2008
@@ -2811,8 +2811,6 @@
 {
 	GList *scan;
 
-	fr_command_set_n_files (command, g_list_length (file_list));
-
 	if (file_list == NULL) {
 		fr_command_extract (command,
 				    file_list,
@@ -3045,6 +3043,8 @@
 		file_list_created = TRUE;
 	}
 
+	fr_command_set_n_files (archive->command, g_list_length (file_list));
+
 	use_base_dir = ! ((base_dir == NULL)
 			  || (strcmp (base_dir, "") == 0)
 			  || (strcmp (base_dir, "/") == 0));
@@ -3058,6 +3058,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]