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:
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/dir.cc5
2 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 74b65588d..8fe91e1fd 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2014-03-09 Christopher Faylor <me.cygwin2014@cgf.cx>
+
+ * dir.cc (opendir): Propagate any errno from build_fh_name.
+
2014-03-07 Corinna Vinschen <corinna@vinschen.de>
* pwdgrp.h (pwdgrp::is_passwd): New inline method.
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc
index c1f8a897b..01b9ab882 100644
--- a/winsup/cygwin/dir.cc
+++ b/winsup/cygwin/dir.cc
@@ -58,6 +58,11 @@ opendir (const char *name)
fh = build_fh_name (name, PC_SYM_FOLLOW);
if (!fh)
res = NULL;
+ else if (fh->error ())
+ {
+ set_errno (fh->error ());
+ res = NULL;
+ }
else if (fh->exists ())
res = fh->opendir (-1);
else