summaryrefslogtreecommitdiff
path: root/src/extract.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2011-11-17 22:19:05 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2011-11-17 22:19:05 +0200
commit02bf3a96a931678211117534ee535863c780c6dc (patch)
treeaef3d1856e83347b358afb06c2743eb4b47a9939 /src/extract.c
parent79138eaef1094eae50d4dfc84bb5007de06d6376 (diff)
downloadtar-02bf3a96a931678211117534ee535863c780c6dc.tar.gz
Warn about existing files in keep-old-files mode (complements 8f390db9).
This is controlled by "existing-file" warning code, which is off by default. * src/common.h (WARN_EXISTING_FILE): New warning code. (WARN_VERBOSE_WARNINGS): Add WARN_EXISTING_FILE. * src/extract.c (maybe_recoverable): warn about existing file if WARN_EXISTING_FILE is set. * src/warning.c: New warning type: "existing-file"
Diffstat (limited to 'src/extract.c')
-rw-r--r--src/extract.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/extract.c b/src/extract.c
index d24f98f6..60ec747f 100644
--- a/src/extract.c
+++ b/src/extract.c
@@ -643,6 +643,8 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made)
switch (old_files_option)
{
case KEEP_OLD_FILES:
+ WARNOPT (WARN_EXISTING_FILE,
+ (0, 0, _("%s: skipping existing file"), file_name));
return RECOVER_SKIP;
case KEEP_NEWER_FILES: