about summary refs log tree commit diff
path: root/io/ftw.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-20 16:30:18 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-20 16:30:18 +0000
commit21a568e279210e6c521e178614dc30e6a1d19937 (patch)
treedfabce59cf49e22ca413251179166f361c514a67 /io/ftw.c
parentdf152cc80e60dc8bf7167a62ee26cb19a9a675d3 (diff)
downloadglibc-21a568e279210e6c521e178614dc30e6a1d19937.tar.gz
glibc-21a568e279210e6c521e178614dc30e6a1d19937.tar.xz
glibc-21a568e279210e6c521e178614dc30e6a1d19937.zip
Update.
2001-01-20  Ulrich Drepper  <drepper@redhat.com>

	* io/ftw.c (ftw_dir): Add slash after directory name if there
	wasn't any.  Reported by loris <loris@iol.it>.
	* io/Makefile (tests): Add bug-ftw2.
	* io/bug-ftw2.c: New file.
Diffstat (limited to 'io/ftw.c')
-rw-r--r--io/ftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io/ftw.c b/io/ftw.c
index 18b60519f0..dc02ebf205 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -398,7 +398,7 @@ ftw_dir (struct ftw_data *data, struct STAT *st)
   startp = strchr (data->dirbuf, '\0');
   /* There always must be a directory name.  */
   assert (startp != data->dirbuf);
-  if (startp != data->dirbuf + 1)
+  if (startp[-1] != '/')
     *startp++ = '/';
   data->ftw.base = startp - data->dirbuf;