From 21a568e279210e6c521e178614dc30e6a1d19937 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 20 Jan 2001 16:30:18 +0000 Subject: Update. 2001-01-20 Ulrich Drepper * io/ftw.c (ftw_dir): Add slash after directory name if there wasn't any. Reported by loris . * io/Makefile (tests): Add bug-ftw2. * io/bug-ftw2.c: New file. --- io/ftw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io/ftw.c') 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; -- cgit 1.4.1