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>2014-03-09 22:39:14 +0400
committerChristopher Faylor <me@cgf.cx>2014-03-09 22:39:14 +0400
commit8e513b0217c044ed42c61f250bf3065004dc137b (patch)
treeb08d7028e76f6742ab4df7bc9f2ee70ed78f0883 /winsup/cygwin/dir.cc
parent0e8dd88459cd23baa31f9c6bf97a4424d7c30742 (diff)
* dir.cc (opendir): Propagate any errno from build_fh_name.
Diffstat (limited to 'winsup/cygwin/dir.cc')
-rw-r--r--winsup/cygwin/dir.cc5
1 files changed, 5 insertions, 0 deletions
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