From 0d3f3658816a3759e608d6b944bb22ad194f389c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 21 May 2008 09:02:42 +0000 Subject: * fhandler.h (dirent_states): Add dirent_nfs_d_ino state and add it to dirent_info_mask. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set dirent_nfs_d_ino flag for NFS shares. Explain why. (fhandler_disk_file::readdir): Use FileNamesInformation instead of FileBothDirectoryInformation info class on NFS clients not supporting the FileIdBothDirectoryInformation info class. Use local pointers to accommodate different offsets. * path.cc (symlink_info::check): Don't test directories for symlinks on NFS shares. Enhance comment. --- winsup/cygwin/path.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index d01b7f8a2..92994d1b1 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2514,8 +2514,9 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt, } /* If the file could be opened with FILE_READ_EA, and if it's on a - NFS share, check if it's a symlink. */ - else if (!no_ea && fs.is_nfs ()) + NFS share, check if it's a symlink. Only files can be symlinks + (which can be symlinks to directories). */ + else if (!no_ea && !(fileattr & FILE_ATTRIBUTE_DIRECTORY) && fs.is_nfs ()) { res = check_nfs_symlink (h); if (!res) -- cgit v1.2.3