(glob_in_dir): It's no error if opendir fails on a file.
authordrepper <drepper>
Sun, 2 May 1999 18:16:06 +0000 (18:16 +0000)
committerdrepper <drepper>
Sun, 2 May 1999 18:16:06 +0000 (18:16 +0000)
sysdeps/generic/glob.c

index d624655..fe09f50 100644 (file)
@@ -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;