diff options
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 47274b4e0..8ad8d2e52 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2260,9 +2260,16 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt, } } } + + /* Check file system while we're having the file open anyway. + This speeds up path_conv noticably (~10%). */ + if (!fs_update_called) + fs.update (&upath, h); + if (NT_SUCCESS (status) - && NT_SUCCESS (status - = NtQueryInformationFile (h, &io, &fbi, sizeof fbi, + && NT_SUCCESS (status = fs.has_buggy_basic_info () + ? NtQueryAttributesFile (&attr, &fbi) + : NtQueryInformationFile (h, &io, &fbi, sizeof fbi, FileBasicInformation))) fileattr = fbi.FileAttributes; else @@ -2359,11 +2366,6 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt, continue; } - /* Check file system while we're having the file open anyway. - This speeds up path_conv noticably (~10%). */ - if (!fs_update_called) - fs.update (&upath, h); - ext_tacked_on = !!*ext_here; res = -1; |