summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc1
2 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index fb5eefc73..b7dcf0a3a 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,11 @@
2005-09-30 Corinna Vinschen <corinna@vinschen.de>
+ * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Also use
+ attributes stored in this->pc if call to GetFileInformationByHandle
+ failed.
+
+2005-09-30 Corinna Vinschen <corinna@vinschen.de>
+
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only write
attributes if call to GetFileInformationByHandle was successful.
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 354873810..fcd7c9cdb 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -162,6 +162,7 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf)
on shares. In this case reset filesize to 0. */
if (local.nFileSizeLow == 0xffffffff && GetLastError ())
local.nFileSizeLow = 0;
+ local.dwFileAttributes = DWORD (pc);
}
else
pc.set_attributes (local.dwFileAttributes);