summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-03-12 22:03:28 +0000
committerCorinna Vinschen <corinna@vinschen.de>2009-03-12 22:03:28 +0000
commit752c477b42f643616de46a0e05292a492a98f4d2 (patch)
treea5eacd4a2ee7861322317c6139e2559bf81e4ba8 /winsup/cygwin/path.cc
parentfc69f1aed5ddfc7af997b90131b8d453eec4fbfb (diff)
downloadcygnal-752c477b42f643616de46a0e05292a492a98f4d2.tar.gz
cygnal-752c477b42f643616de46a0e05292a492a98f4d2.tar.bz2
cygnal-752c477b42f643616de46a0e05292a492a98f4d2.zip
* 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.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc5
1 files changed, 4 insertions, 1 deletions
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))
{