aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/glob.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index d624655718..fe09f50a10 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -1272,8 +1272,9 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
: (__ptr_t) opendir (directory));
if (stream == NULL)
{
- if ((errfunc != NULL && (*errfunc) (directory, errno))
- || (flags & GLOB_ERR))
+ if (errno != ENOTDIR
+ && ((errfunc != NULL && (*errfunc) (directory, errno))
+ || (flags & GLOB_ERR)))
return GLOB_ABORTED;
nfound = 0;
meta = 0;