* dir.cc (opendir): Propagate any errno from build_fh_name.

This commit is contained in:
Christopher Faylor 2014-03-09 18:39:14 +00:00
parent 0e8dd88459
commit 8e513b0217
2 changed files with 9 additions and 0 deletions

View File

@ -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> 2014-03-07 Corinna Vinschen <corinna@vinschen.de>
* pwdgrp.h (pwdgrp::is_passwd): New inline method. * pwdgrp.h (pwdgrp::is_passwd): New inline method.

View File

@ -58,6 +58,11 @@ opendir (const char *name)
fh = build_fh_name (name, PC_SYM_FOLLOW); fh = build_fh_name (name, PC_SYM_FOLLOW);
if (!fh) if (!fh)
res = NULL; res = NULL;
else if (fh->error ())
{
set_errno (fh->error ());
res = NULL;
}
else if (fh->exists ()) else if (fh->exists ())
res = fh->opendir (-1); res = fh->opendir (-1);
else else