1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Don't error out while searching for empty directories.

Submitted by:	Bakul Shah <bakul at bitblocks dot com>
This commit is contained in:
Kevin Lo 2010-12-02 01:46:06 +00:00
parent 2ea8da28e9
commit e66a677b27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=216106

View File

@ -559,7 +559,7 @@ f_empty(PLAN *plan __unused, FTSENT *entry)
empty = 1; empty = 1;
dir = opendir(entry->fts_accpath); dir = opendir(entry->fts_accpath);
if (dir == NULL) if (dir == NULL)
err(1, "%s", entry->fts_accpath); return 0;
for (dp = readdir(dir); dp; dp = readdir(dir)) for (dp = readdir(dir); dp; dp = readdir(dir))
if (dp->d_name[0] != '.' || if (dp->d_name[0] != '.' ||
(dp->d_name[1] != '\0' && (dp->d_name[1] != '\0' &&