[file-roller] Fixed error when a filename contains the % sign



commit 3292a98315a61d342e0d39639d3ddbad66ff6ec4
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Mar 1 19:33:18 2011 +0100

    Fixed error when a filename contains the % sign
    
    No need to convert the file list in fr_archive_add
    
    [bug #638868]

 src/fr-archive.c |   23 +----------------------
 1 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/src/fr-archive.c b/src/fr-archive.c
index 268f338..fa63e4a 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -1480,25 +1480,6 @@ fr_archive_set_add_is_stoppable_func (FrArchive     *archive,
 }
 
 
-static GList *
-convert_to_local_file_list (GList *file_list)
-{
-	GList *local_file_list = NULL;
-	GList *scan;
-
-	for (scan = file_list; scan; scan = scan->next) {
-		char *uri = scan->data;
-		char *local_filename;
-
-		local_filename = g_uri_unescape_string (uri, G_URI_RESERVED_CHARS_ALLOWED_IN_PATH);
-		if (local_filename != NULL)
-			local_file_list = g_list_prepend (local_file_list, local_filename);
-	}
-
-	return local_file_list;
-}
-
-
 static gboolean
 save_list_to_temp_file (GList   *file_list,
 		        char   **list_dir,
@@ -1623,7 +1604,6 @@ fr_archive_add (FrArchive     *archive,
 
 	fr_archive_stoppable (archive, fr_archive_add_is_stoppable (archive));
 
-	file_list = convert_to_local_file_list (file_list);
 	tmp_base_dir = g_strdup (base_dir);
 
 	if ((dest_dir != NULL) && (*dest_dir != '\0') && (strcmp (dest_dir, "/") != 0)) {
@@ -1640,10 +1620,9 @@ fr_archive_add (FrArchive     *archive,
 			char *filename = scan->data;
 			new_file_list = g_list_prepend (new_file_list, g_build_filename (rel_dest_dir, filename, NULL));
 		}
-		path_list_free (file_list);
 	}
 	else
-		new_file_list = file_list;
+		new_file_list = path_list_dup (file_list);
 
 	/* if the command cannot update,  get the list of files that are
 	 * newer than the ones in the archive. */



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