* path.cc (symlink_info::check): Set error from status code if opening

the parent directory failed, but keep special case for root dirs.
This commit is contained in:
Corinna Vinschen 2014-10-20 10:29:30 +00:00
parent 2a126568ad
commit 85bfa90696
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2014-10-20 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink_info::check): Set error from status code if opening
the parent directory failed, but keep special case for root dirs.
2014-10-17 Corinna Vinschen <corinna@vinschen.de> 2014-10-17 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (cygheap_fixup_in_child): Call set_dll_dir. * cygheap.cc (cygheap_fixup_in_child): Call set_dll_dir.

View File

@ -2834,7 +2834,13 @@ restart:
This case is only recognized by the length of the This case is only recognized by the length of the
basename part. If it's 0, the incoming file is the basename part. If it's 0, the incoming file is the
root of a drive. So we at least know it's a directory. */ root of a drive. So we at least know it's a directory. */
fileattr = basename.Length ? 0 : FILE_ATTRIBUTE_DIRECTORY; if (basename.Length)
fileattr = FILE_ATTRIBUTE_DIRECTORY;
else
{
fileattr = 0;
set_error (geterrno_from_nt_status (status));
}
} }
else else
{ {