summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2007-03-15 10:11:38 +0000
committercperciva <cperciva@FreeBSD.org>2007-03-15 10:11:38 +0000
commit32001bac970022e78123f071dcf4a47851e8664c (patch)
tree4d0ea6b1dec931c619c4d1e8cf058d610bbb284b /usr.bin/tar
parentaddad261ef91418553dcfd218762cfb69ff1a373 (diff)
downloadFreeBSD-src-32001bac970022e78123f071dcf4a47851e8664c.zip
FreeBSD-src-32001bac970022e78123f071dcf4a47851e8664c.tar.gz
Don't consider an lstat(2) failure to be an error (in the sense of
affecting the return value from bsdtar), since (a) it usually occurs due to a perfectly innocent (and unavoidable) race condition where a user deletes a file in the window between bsdtar reading a directory and attempting to read the file; and (b) aside from printing a warning message, bsdtar behaves exactly as if the file had been deleted prior to bsdtar reading its parent directory. Reviewed by: kientzle MFC after: 6 days
Diffstat (limited to 'usr.bin/tar')
-rw-r--r--usr.bin/tar/write.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c
index 388a05c..7353439 100644
--- a/usr.bin/tar/write.c
+++ b/usr.bin/tar/write.c
@@ -614,7 +614,6 @@ write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path)
if (lst == NULL) {
/* Couldn't lstat(); must not exist. */
bsdtar_warnc(bsdtar, errno, "%s: Cannot stat", name);
- bsdtar->return_value = 1;
continue;
}
if (S_ISLNK(lst->st_mode))
OpenPOWER on IntegriCloud