summaryrefslogtreecommitdiff
path: root/src/compare.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2010-11-15 11:22:27 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2010-11-15 11:22:27 +0200
commit73d0d1a0f883be5f67534362c99382f1eae8d178 (patch)
tree505ea36b171cbc2bd410c89bb19baaf2cc6b30bd /src/compare.c
parentff2bc5c0a119db60015052ec1f781dcac9d276ae (diff)
downloadtar-73d0d1a0f883be5f67534362c99382f1eae8d178.tar.gz
Issue a warning if the archive being compared contais transformed file names.
* src/common.h (transform_program_p): New proto. * src/transform.c (transform_program_p): New function. * src/compare.c (verify_volume): Warn if the archive contains transformed file names.
Diffstat (limited to 'src/compare.c')
-rw-r--r--src/compare.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/compare.c b/src/compare.c
index f3112c6d..91ced570 100644
--- a/src/compare.c
+++ b/src/compare.c
@@ -512,14 +512,23 @@ diff_archive (void)
void
verify_volume (void)
{
+ int may_fail = 0;
if (removed_prefixes_p ())
{
WARN((0, 0,
_("Archive contains file names with leading prefixes removed.")));
+ may_fail = 1;
+ }
+ if (transform_program_p ())
+ {
WARN((0, 0,
- _("Verification may fail to locate original files.")));
+ _("Archive contains transformed file names.")));
+ may_fail = 1;
}
-
+ if (may_fail)
+ WARN((0, 0,
+ _("Verification may fail to locate original files.")));
+
if (!diff_buffer)
diff_init ();