tar/tar-1.26-allow-extract-single-volume.patch
Pavel Raiskup b40bf4511c tar: allow extracting from just single volume
Resolves: #919897
Version: 2:1.26-20
2013-03-19 09:52:57 +01:00

28 lines
725 B
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

diff --git a/src/extract.c b/src/extract.c
index 87b383a..340beea 100644
--- a/src/extract.c
+++ b/src/extract.c
@@ -1415,6 +1415,13 @@ extract_failure (char *file_name, int typeflag)
return 1;
}
+static int
+extract_skip (char *file_name, int typeflag)
+{
+ skip_member ();
+ return 0;
+}
+
typedef int (*tar_extractor_t) (char *file_name, int typeflag);
@@ -1495,7 +1502,7 @@ prepare_to_extract (char const *file_name, int typeflag, tar_extractor_t *fun)
ERROR ((0, 0,
_("%s: Cannot extract -- file is continued from another volume"),
quotearg_colon (current_stat_info.file_name)));
- *fun = extract_failure;
+ *fun = extract_skip;
break;
case GNUTYPE_LONGNAME: