Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Dec 2010 01:46:06 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r216106 - head/usr.bin/find
Message-ID:  <201012020146.oB21k6RI066820@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Thu Dec  2 01:46:06 2010
New Revision: 216106
URL: http://svn.freebsd.org/changeset/base/216106

Log:
  Don't error out while searching for empty directories.
  
  Submitted by:	Bakul Shah <bakul at bitblocks dot com>

Modified:
  head/usr.bin/find/function.c

Modified: head/usr.bin/find/function.c
==============================================================================
--- head/usr.bin/find/function.c	Thu Dec  2 01:36:00 2010	(r216105)
+++ head/usr.bin/find/function.c	Thu Dec  2 01:46:06 2010	(r216106)
@@ -559,7 +559,7 @@ f_empty(PLAN *plan __unused, FTSENT *ent
 		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' &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012020146.oB21k6RI066820>