diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 32ace4d38..f1cd5693e 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1967,13 +1967,14 @@ stat_worker (path_conv &pc, struct stat *buf) { fhandler_base *fh; - debug_printf ("(%S, %p, %p), file_attributes %d", - pc.get_nt_native_path (), buf, fh, (DWORD) *fh); memset (buf, 0, sizeof (*buf)); if (!(fh = build_fh_pc (pc))) __leave; + debug_printf ("(%S, %p, %p), file_attributes %d", + pc.get_nt_native_path (), buf, fh, (DWORD) *fh); + res = fh->fstat (buf); if (!res) fh->stat_fixup (buf);