diff options
author | pho <pho@FreeBSD.org> | 1999-08-14 12:19:40 +0000 |
---|---|---|
committer | pho <pho@FreeBSD.org> | 1999-08-14 12:19:40 +0000 |
commit | effd222c57436670dfe5b8b06bd7a19a8cc61248 (patch) | |
tree | f93ad8599214ce7c2c73afc4c12dd01af92137d4 /lib/libc/gen/fts-compat.c | |
parent | 5f45261e990bb420f6394e615c3495668886dfe9 (diff) | |
download | FreeBSD-src-effd222c57436670dfe5b8b06bd7a19a8cc61248.zip FreeBSD-src-effd222c57436670dfe5b8b06bd7a19a8cc61248.tar.gz |
Reviewed by: phk
When fts_open is used with option FTS_NOCHDIR the full
path entry of type FTS_DP is returned with a trailing
'/' if the final directory is empty.
This fix coresponds to netbsd's __fts13.c v. 1.16
Diffstat (limited to 'lib/libc/gen/fts-compat.c')
-rw-r--r-- | lib/libc/gen/fts-compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index da88ed1..16d05d9 100644 --- a/lib/libc/gen/fts-compat.c +++ b/lib/libc/gen/fts-compat.c @@ -748,7 +748,7 @@ mem1: saved_errno = errno; * state. */ if (ISSET(FTS_NOCHDIR)) { - if (len == sp->fts_pathlen) + if (cp - 1 > sp->fts_path) --cp; *cp = '\0'; } |