summaryrefslogtreecommitdiff
path: root/bin/ls/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ls/ls.c')
-rw-r--r--bin/ls/ls.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index dc7e5323029..136cb073df8 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ls.c,v 1.32 2008/12/29 14:49:27 otto Exp $ */
+/* $OpenBSD: ls.c,v 1.33 2008/12/30 15:37:30 otto Exp $ */
/* $NetBSD: ls.c,v 1.18 1996/07/09 09:16:29 mycroft Exp $ */
/*
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ls.c 8.7 (Berkeley) 8/5/94";
#else
-static char rcsid[] = "$OpenBSD: ls.c,v 1.32 2008/12/29 14:49:27 otto Exp $";
+static char rcsid[] = "$OpenBSD: ls.c,v 1.33 2008/12/30 15:37:30 otto Exp $";
#endif
#endif /* not lint */
@@ -385,6 +385,10 @@ traverse(int argc, char *argv[], int options)
saved_errno = errno;
display(p, chp);
+ /*
+ * On fts_children() returning error do recurse to see
+ * the error.
+ */
if (!f_recursive && !(chp == NULL && saved_errno != 0))
(void)fts_set(ftsp, p, FTS_SKIP);
break;