file-roller r2302 - in trunk: . src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: file-roller r2302 - in trunk: . src
- Date: Thu, 5 Jun 2008 15:39:18 +0000 (UTC)
Author: paobac
Date: Thu Jun 5 15:39:18 2008
New Revision: 2302
URL: http://svn.gnome.org/viewvc/file-roller?rev=2302&view=rev
Log:
2008-06-05 Paolo Bacchilega <paobac svn gnome org>
* src/fr-archive.c (fr_archive_extract_to_local):
we need the file list when extracting all the files and not all the
options are supported by the command.
* src/fr-command-tar.c (fr_command_tar_init):
set propExtractCanAvoidOverwrite to FALSE for tar archives because the
tar command returns a fatal error when a file already exists.
Modified:
trunk/ChangeLog
trunk/src/fr-archive.c
trunk/src/fr-command-tar.c
Modified: trunk/src/fr-archive.c
==============================================================================
--- trunk/src/fr-archive.c (original)
+++ trunk/src/fr-archive.c Thu Jun 5 15:39:18 2008
@@ -2571,6 +2571,7 @@
GList *scan;
gboolean extract_all;
gboolean use_base_dir;
+ gboolean all_options_supported;
gboolean move_to_dest_dir;
gboolean file_list_created = FALSE;
@@ -2581,8 +2582,17 @@
/* if a command supports all the requested options use
* fr_command_extract directly. */
+ use_base_dir = ! ((base_dir == NULL)
+ || (strcmp (base_dir, "") == 0)
+ || (strcmp (base_dir, "/") == 0));
+
+ all_options_supported = (! use_base_dir
+ && ! (! overwrite && ! archive->command->propExtractCanAvoidOverwrite)
+ && ! (skip_older && ! archive->command->propExtractCanSkipOlder)
+ && ! (junk_paths && ! archive->command->propExtractCanJunkPaths));
+
extract_all = (file_list == NULL);
- if (extract_all && ! archive->command->propCanExtractAll) {
+ if (extract_all && (! all_options_supported || ! archive->command->propCanExtractAll)) {
int i;
file_list = NULL;
@@ -2598,15 +2608,7 @@
else
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));
-
- if (! use_base_dir
- && ! (! overwrite && ! archive->command->propExtractCanAvoidOverwrite)
- && ! (skip_older && ! archive->command->propExtractCanSkipOlder)
- && ! (junk_paths && ! archive->command->propExtractCanJunkPaths))
- {
+ if (all_options_supported) {
gboolean created_filtered_list = FALSE;
if (! extract_all && archive_type_has_issues_extracting_non_empty_folders (archive)) {
Modified: trunk/src/fr-command-tar.c
==============================================================================
--- trunk/src/fr-command-tar.c (original)
+++ trunk/src/fr-command-tar.c Thu Jun 5 15:39:18 2008
@@ -907,7 +907,7 @@
comm->propAddCanUpdate = FALSE;
comm->propAddCanReplace = FALSE;
comm->propAddCanStoreFolders = TRUE;
- comm->propExtractCanAvoidOverwrite = TRUE;
+ comm->propExtractCanAvoidOverwrite = FALSE;
comm->propExtractCanSkipOlder = TRUE;
comm->propExtractCanJunkPaths = FALSE;
comm->propPassword = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]