Module Name: src
Committed By: jmcneill
Date: Thu Feb 24 02:55:19 UTC 2011
Modified Files:
src/usr.bin/find: function.c
Log Message:
Don't error out while searching for empty directories, from FreeBSD:
http://lists.freebsd.org/pipermail/svn-src-head/2010-December/022913.html
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/usr.bin/find/function.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/find/function.c
diff -u src/usr.bin/find/function.c:1.65 src/usr.bin/find/function.c:1.66
--- src/usr.bin/find/function.c:1.65 Thu Jan 6 08:18:42 2011
+++ src/usr.bin/find/function.c Thu Feb 24 02:55:18 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: function.c,v 1.65 2011/01/06 08:18:42 dholland Exp $ */
+/* $NetBSD: function.c,v 1.66 2011/02/24 02:55:18 jmcneill Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "from: @(#)function.c 8.10 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: function.c,v 1.65 2011/01/06 08:18:42 dholland Exp $");
+__RCSID("$NetBSD: function.c,v 1.66 2011/02/24 02:55:18 jmcneill Exp $");
#endif
#endif /* not lint */
@@ -453,7 +453,7 @@
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' &&