aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/find
diff options
context:
space:
mode:
authorKevin Lo <kevlo@FreeBSD.org>2010-12-02 01:46:06 +0000
committerKevin Lo <kevlo@FreeBSD.org>2010-12-02 01:46:06 +0000
commite66a677b27cfbde629be335c65ee39e4a91a6505 (patch)
tree8e6adab05e419bb4d565597d8f824e96728615cc /usr.bin/find
parent2ea8da28e9f3d1ec8c25d32c07f84093102f112d (diff)
downloadsrc-e66a677b27cfbde629be335c65ee39e4a91a6505.tar.gz
src-e66a677b27cfbde629be335c65ee39e4a91a6505.zip
Don't error out while searching for empty directories.
Submitted by: Bakul Shah <bakul at bitblocks dot com>
Notes
Notes: svn path=/head/; revision=216106
Diffstat (limited to 'usr.bin/find')
-rw-r--r--usr.bin/find/function.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c
index 1714627d1fc3..474660d4a0d1 100644
--- a/usr.bin/find/function.c
+++ b/usr.bin/find/function.c
@@ -559,7 +559,7 @@ f_empty(PLAN *plan __unused, FTSENT *entry)
empty = 1;
dir = opendir(entry->fts_accpath);
if (dir == NULL)
- err(1, "%s", entry->fts_accpath);
+ return 0;
for (dp = readdir(dir); dp; dp = readdir(dir))
if (dp->d_name[0] != '.' ||
(dp->d_name[1] != '\0' &&