From 752c477b42f643616de46a0e05292a492a98f4d2 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 12 Mar 2009 22:03:28 +0000 Subject: * fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined earlier. (get_ino_by_handle): Take additional path_conv argument, accommodate throughout. Only use FileId if isgood_inode check is true. (fhandler_base::open_fs): Simplify setting ino due to above change. (readdir_get_ino): Make sure to return always a non-zero inode number. (fhandler_disk_file::readdir): Always open file in dir with FILE_OPEN_REPARSE_POINT so as not to open wrong file. Drop call to isgood_inode here. * path.cc (symlink_info::check): Call fs.update in case we're fetching file information from call to NtQueryDirectoryFile. --- winsup/cygwin/path.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/path.cc') diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index ae01109a1..27a0bfcd2 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -2191,7 +2191,7 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt, &attr, &io, FILE_SHARE_VALID_FLAGS, FILE_OPEN_REPARSE_POINT | FILE_OPEN_FOR_BACKUP_INTENT); - attr.Attributes = ci_flag; + attr.Attributes = 0; if (NT_SUCCESS (status)) { fs.update (&upath, h); @@ -2265,6 +2265,9 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt, &fdi_buf, sizeof fdi_buf, FileDirectoryInformation, TRUE, &basename, TRUE); + /* Take the opportunity to check file system while we're + having the handle to the parent dir. */ + fs.update (&upath, h); NtClose (dir); if (!NT_SUCCESS (status)) { -- cgit v1.2.3