summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc8
2 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index baf5a336b..609495c42 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* cygheap.cc (cygheap_fixup_in_child): Call set_dll_dir.
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index e5ce312ed..2ead43f9a 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2834,7 +2834,13 @@ restart:
This case is only recognized by the length of 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. */
- 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
{