summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_disk_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 04b6e3cd8..00d4d4a4e 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -333,7 +333,6 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf)
{
NTSTATUS status;
IO_STATUS_BLOCK io;
- HANDLE h = get_stat_handle ();
if (pc.fs_is_nfs ())
return fstat_by_nfs_ea (buf);
@@ -350,6 +349,8 @@ fhandler_base::fstat_by_handle (struct __stat64 *buf)
FILE_STANDARD_INFORMATION fsi;
FILE_INTERNAL_INFORMATION fii;
+ HANDLE h = get_stat_handle ();
+
if (pc.has_buggy_basic_info ())
{
status = NtQueryInformationFile (h, &io, &fi, sizeof fi,