diff options
author | 1999-08-16 07:57:02 +0000 | |
---|---|---|
committer | 1999-08-16 07:57:02 +0000 | |
commit | 35304ed979a07e4bcca1c4f87f448a1b2f5e90cc (patch) | |
tree | a5697034d46b641cc975352e41d5812bce5a8425 | |
parent | shorten dmesg output. (diff) | |
download | wireguard-openbsd-35304ed979a07e4bcca1c4f87f448a1b2f5e90cc.tar.xz wireguard-openbsd-35304ed979a07e4bcca1c4f87f448a1b2f5e90cc.zip |
If the FTS_NOCHDIR flag is set and the final directory is empty,
the trailing '/' would not be chopped; pho@freebsd.org
-rw-r--r-- | lib/libc/gen/fts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 18264706cfc..ea2c34f2c1e 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fts.c,v 1.19 1999/05/17 02:32:31 millert Exp $ */ +/* $OpenBSD: fts.c,v 1.20 1999/08/16 07:57:02 millert Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; #else -static char rcsid[] = "$OpenBSD: fts.c,v 1.19 1999/05/17 02:32:31 millert Exp $"; +static char rcsid[] = "$OpenBSD: fts.c,v 1.20 1999/08/16 07:57:02 millert Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -776,7 +776,7 @@ mem1: saved_errno = errno; * state. */ if (ISSET(FTS_NOCHDIR)) { - if (len == sp->fts_pathlen) + if (len == sp->fts_pathlen || nitems == 0) --cp; *cp = '\0'; } |