Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-06-20 11:06:17 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-06-20 11:06:45 +0300
commit185cd97d24150db8964754ae0cbb69102dd6cfdb (patch)
tree409b5b3dc7d2c8371f4aa43dc1ae34895f4423fb /winsup
parent7a4e299a18a48280f36d29a86f23384ab821fc36 (diff)
cygwin: readdir: Activate check for remote reparse points
Fix and move comment accordingly. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index f8adcaa4c..ca1da384e 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -189,6 +189,10 @@ readdir_check_reparse_point (POBJECT_ATTRIBUTES attr, bool remote)
&io, FSCTL_GET_REPARSE_POINT, NULL, 0,
(LPVOID) rp, MAXIMUM_REPARSE_DATA_BUFFER_SIZE)))
{
+ /* If reparse point is stored on a remote volume, lstat returns
+ them as normal files or dirs, not as symlink. For a description,
+ see the comment preceeding remote check in
+ symlink_info::check_reparse_point. */
if (!remote && rp->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
{
RtlInitCountedUnicodeString (&subst,
@@ -2028,10 +2032,7 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err,
InitializeObjectAttributes (&oattr, fname, pc.objcaseinsensitive (),
get_handle (), NULL);
- /* FUTURE: Ideally would know at this point if reparse point
- is stored on a remote volume. Without this, may return DT_LNK
- for remote names that end up lstat-ing as a normal directory. */
- if (readdir_check_reparse_point (&oattr, false/*remote*/))
+ if (readdir_check_reparse_point (&oattr, isremote ()))
de->d_type = DT_LNK;
}