find(1): Is this a bug or not?

Dag-Erling Smørgrav des at des.no
Tue Nov 30 11:33:55 UTC 2010


Bakul Shah <bakul at bitblocks.com> writes:
> Index: function.c
> ===================================================================
> --- function.c  (revision 212707)
> +++ function.c  (working copy)
> @@ -560,7 +560,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' &&

You should replace the err() call with a warn() call instead of removing
it outright.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-hackers mailing list