diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-09-30 12:05:42 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-09-30 12:05:42 +0400 |
commit | 04f3d97fe44183782be0ac4016e6dabcc960d2c5 (patch) | |
tree | a20a90675e737a7aad70dd5ea0114f1bac0564c0 /winsup/cygwin | |
parent | 40c7d132ef0a3084552fd8444c4d31f162f99611 (diff) |
* fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Only write
attributes if call to GetFileInformationByHandle was successful.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 2966ad6e4..fb5eefc73 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +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. + 2005-09-29 Christopher Faylor <cgf@timesys.com> * fork.cc (frok::parent): Simplify error messages. Don't issue an diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 4682184f1..354873810 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -163,8 +163,8 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf) if (local.nFileSizeLow == 0xffffffff && GetLastError ()) local.nFileSizeLow = 0; } - - pc.set_attributes (local.dwFileAttributes); + else + pc.set_attributes (local.dwFileAttributes); return fstat_helper (buf, local.ftLastWriteTime, /* see fstat_helper comment */ local.ftLastAccessTime, |