From 91289ebc39c19da4ed72c53c6407e1cb36091bdc Mon Sep 17 00:00:00 2001 From: Peter Holm Date: Sun, 15 Aug 1999 19:21:29 +0000 Subject: [PATCH] Reverted to revision 1.8 as previous fix causes fts_open with with a path name argument with a trailing '/' to fail. Reviewed by: phk --- lib/libc/gen/fts-compat.c | 2 +- lib/libc/gen/fts.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index 16d05d9f3d6..da88ed13946 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 (cp - 1 > sp->fts_path) + if (len == sp->fts_pathlen) --cp; *cp = '\0'; } diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 16d05d9f3d6..da88ed13946 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -748,7 +748,7 @@ mem1: saved_errno = errno; * state. */ if (ISSET(FTS_NOCHDIR)) { - if (cp - 1 > sp->fts_path) + if (len == sp->fts_pathlen) --cp; *cp = '\0'; }