Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-01-04 22:06:01 +0300
committerChristopher Faylor <me@cgf.cx>2002-01-04 22:06:01 +0300
commit7acba9716bf3312fb504a779057515d37c512f37 (patch)
tree95ee9c4d1d61e4103fa74c0807b0e5552b63b724
parentdc63cea5ed3a6f42d91d211c275bb67cb127539d (diff)
* dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/dir.cc2
2 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d169b102d..6bce22534 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2002-01-04 Christopher Faylor <cgf@redhat.com>
+
+ * dir.cc (opendir): Don't attempt to call sub-opendir if ENOENT.
+
2001-01-04 Corinna Vinschen <corinna@vinschen.de>
* net.cc: Replace usage of AF_UNIX by Posix compliant AF_LOCAL
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);