NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/44184: Don't error out while searching for empty directories.



>Number:         44184
>Category:       bin
>Synopsis:       Don't error out while searching for empty directories.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 02 14:30:00 +0000 2010
>Originator:     Henning Petersen
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
Don't error out while searching for empty directories,
from freebsd (SVN rev 216106).

>How-To-Repeat:

>Fix:
diff -u -r1.64 function.c
--- usr.bin/find/function.c     19 Jul 2007 07:49:30 -0000      1.64
+++ usr.bin/find/function.c     2 Dec 2010 14:12:56 -0000
@@ -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