aboutsummaryrefslogtreecommitdiff
path: root/io/ftw.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/ftw.c')
-rw-r--r--io/ftw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/io/ftw.c b/io/ftw.c
index 862774c..cbd6be7 100644
--- a/io/ftw.c
+++ b/io/ftw.c
@@ -473,6 +473,9 @@ 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