diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-06-21 13:28:12 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-06-21 13:28:12 +0200 |
commit | 36d4eb12b5f23093ae1285d0725f4930235a07e5 (patch) | |
tree | 65848f5ed52d38e1fafc2654f6752afa8e3f22b3 /winsup/cygwin/path.cc | |
parent | f91865c8cf85c4c4309c64ded42c847a64872b1e (diff) | |
download | cygnal-36d4eb12b5f23093ae1285d0725f4930235a07e5.tar.gz cygnal-36d4eb12b5f23093ae1285d0725f4930235a07e5.tar.bz2 cygnal-36d4eb12b5f23093ae1285d0725f4930235a07e5.zip |
Use new path_conv_handle functions to access file info
This avoids having to call nfs_fetch_fattr3/file_get_fai depending
on FS type as well as having to extract the info FS dependent.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 18d5c1dfa..72b152c78 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2794,19 +2794,9 @@ restart: This speeds up path_conv noticably (~10%). */ && (fs.inited () || fs.update (&upath, h))) { - if (fs.is_nfs ()) - { - status = nfs_fetch_fattr3 (h, conv_hdl.nfsattr ()); - if (NT_SUCCESS (status)) - fileattr = ((conv_hdl.nfsattr ()->type & 7) == NF3DIR) - ? FILE_ATTRIBUTE_DIRECTORY : 0; - } - else - { - status = file_get_fai (h, conv_hdl.fai ()); - if (NT_SUCCESS (status)) - fileattr = conv_hdl.fai ()->BasicInformation.FileAttributes; - } + status = conv_hdl.get_finfo (h, fs.is_nfs ()); + if (NT_SUCCESS (status)) + fileattr = conv_hdl.get_dosattr (fs.is_nfs ()); } if (!NT_SUCCESS (status)) { |