Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/find Don't error out while searching for empty direc...
details: https://anonhg.NetBSD.org/src/rev/455ce672dbe6
branches: trunk
changeset: 762595:455ce672dbe6
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Feb 24 02:55:18 2011 +0000
description:
Don't error out while searching for empty directories, from FreeBSD:
http://lists.freebsd.org/pipermail/svn-src-head/2010-December/022913.html
diffstat:
usr.bin/find/function.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 019c723e647b -r 455ce672dbe6 usr.bin/find/function.c
--- a/usr.bin/find/function.c Thu Feb 24 00:40:09 2011 +0000
+++ b/usr.bin/find/function.c Thu Feb 24 02:55:18 2011 +0000
@@ -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' &&
Home |
Main Index |
Thread Index |
Old Index