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"
#define WARN_UNKNOWN_KEYWORD 0x00020000
#define WARN_XDEV 0x00040000
#define WARN_DECOMPRESS_PROGRAM 0x00080000
+#define WARN_EXISTING_FILE 0x00100000
/* The warnings composing WARN_VERBOSE_WARNINGS are enabled by default
in verbose mode */
#define WARN_VERBOSE_WARNINGS (WARN_RENAME_DIRECTORY|WARN_NEW_DIRECTORY|\
- WARN_DECOMPRESS_PROGRAM)
+ WARN_DECOMPRESS_PROGRAM|WARN_EXISTING_FILE)
#define WARN_ALL (~WARN_VERBOSE_WARNINGS)
void set_warning_option (const char *arg);
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:
"unknown-keyword",
"xdev",
"decompress-program",
+ "existing-file",
NULL
};
WARN_UNKNOWN_CAST,
WARN_UNKNOWN_KEYWORD,
WARN_XDEV,
- WARN_DECOMPRESS_PROGRAM
+ WARN_DECOMPRESS_PROGRAM,
+ WARN_EXISTING_FILE
};
ARGMATCH_VERIFY (warning_args, warning_types);