From 5e85b65e97df011f104e47f16be9444cb5f87f45 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Thu, 15 Mar 2007 10:11:38 +0000 Subject: [PATCH] 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 --- usr.bin/tar/write.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index 388a05ccfbc..735343959fa 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))