aboutsummaryrefslogtreecommitdiff
path: root/io/ftw.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-12-17 23:07:40 +0000
committerUlrich Drepper <drepper@redhat.com>2001-12-17 23:07:40 +0000
commit0e24e73d6dfd32c842afe028d6d37e2ea3c3bd54 (patch)
tree4cef63468414ae60b720c02f336686fce1557342 /io/ftw.c
parent79dbd981958144758afdb8b1feaa871a32a36c3d (diff)
downloadglibc-0e24e73d6dfd32c842afe028d6d37e2ea3c3bd54.tar
glibc-0e24e73d6dfd32c842afe028d6d37e2ea3c3bd54.tar.gz
glibc-0e24e73d6dfd32c842afe028d6d37e2ea3c3bd54.tar.bz2
glibc-0e24e73d6dfd32c842afe028d6d37e2ea3c3bd54.zip
(ftw_dir): Handle inaccessibility of toplevel dir different than implemented in last patch.
Diffstat (limited to 'io/ftw.c')
-rw-r--r--io/ftw.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/io/ftw.c b/io/ftw.c
index cbd6be707e..0b4565fedf 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -473,9 +473,6 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
return -1;
}
- if (__access (dir, R_OK) != 0)
- return -1;
-
data.maxdir = descriptors < 1 ? 1 : descriptors;
data.actdir = 0;
data.dirstreams = (struct dir_data **) alloca (data.maxdir
@@ -552,12 +549,10 @@ ftw_startup (const char *dir, int is_nftw, void *func, int descriptors,
? LXSTAT (_STAT_VER, data.dirbuf, &st)
: XSTAT (_STAT_VER, data.dirbuf, &st)) < 0)
{
- if (errno == EACCES)
- result = (*data.func) (data.dirbuf, &st, FTW_NS, &data.ftw);
- else if (!(flags & FTW_PHYS)
- && errno == ENOENT
- && LXSTAT (_STAT_VER, dir, &st) == 0
- && S_ISLNK (st.st_mode))
+ if (!(flags & FTW_PHYS)
+ && errno == ENOENT
+ && LXSTAT (_STAT_VER, dir, &st) == 0
+ && S_ISLNK (st.st_mode))
result = (*data.func) (data.dirbuf, &st, data.cvt_arr[FTW_SLN],
&data.ftw);
else