Fix --keep-old-files option.

The regression was introduced by 8f390db9.  This patch implements additional
option --skip-old-files, which silently skips members which would cause
writing over existing files, and restores --keep-old-files to its traditional
behavior.

* NEWS: Update.
* configure.ac: Update.
* doc/tar.texi: Document the changes.
* src/common.h (SKIP_OLD_FILES): New old_files mode.
* src/extract.c (maybe_recoverable): Restore KEEP_OLD_FILES behavior.
Handle SKIP_OLD_FILES.
* src/tar.c: New option --skip-old-files.
* tests/extrac18.at: New file.
* tests/extrac19.at: New file.
* tests/Makefile.am: Add new test cases.
* tests/testsuite.at: Likewise.
This commit is contained in:
Sergey Poznyakoff
2011-11-26 15:41:43 +02:00
parent 02bf3a96a9
commit 7a5a3708cb
10 changed files with 209 additions and 27 deletions

View File

@@ -166,6 +166,8 @@ m4_include([extrac14.at])
m4_include([extrac15.at])
m4_include([extrac16.at])
m4_include([extrac17.at])
m4_include([extrac18.at])
m4_include([extrac19.at])
m4_include([label01.at])
m4_include([label02.at])