diff options
Diffstat (limited to 'winsup/cygwin/dir.cc')
-rw-r--r-- | winsup/cygwin/dir.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 5713c5767..44db5d7be 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -88,6 +88,8 @@ opendir (const char *name) PC_SYM_FOLLOW | PC_FULL, NULL); if (!fh) res = NULL; + else if (!pc.exists ()) + set_errno (ENOENT); else { res = fh->opendir (pc); |