diff options
author | Tim Kientzle <kientzle@FreeBSD.org> | 2004-06-27 18:32:14 +0000 |
---|---|---|
committer | Tim Kientzle <kientzle@FreeBSD.org> | 2004-06-27 18:32:14 +0000 |
commit | e2fe7499b66699cdb86a147e1f8aa11554171b92 (patch) | |
tree | 67764a5b562724e535ee3d8d32cc1bdc90df6774 /usr.bin | |
parent | 52b8c8cd0062dd5074ec8eec4523d3bba87dd912 (diff) | |
download | src-test2-e2fe7499b66699cdb86a147e1f8aa11554171b92.tar.gz src-test2-e2fe7499b66699cdb86a147e1f8aa11554171b92.zip |
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tar/write.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index dc2ddc0326b8..c8cac23d25fe 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -794,8 +794,15 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, struct stat *st, } /* Strip leading '/' unless user has asked us not to. */ - if (pathname && pathname[0] == '/' && !bsdtar->option_absolute_paths) + if (pathname && pathname[0] == '/' && !bsdtar->option_absolute_paths) { + /* Generate a warning the first time this happens. */ + if (!bsdtar->warned_lead_slash) { + bsdtar_warnc(bsdtar, 0, + "Removing leading '/' from member names"); + bsdtar->warned_lead_slash = 1; + } pathname++; + } archive_entry_set_pathname(entry, pathname); |