summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 00a9c1d65..fb4526fd5 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2533,6 +2533,11 @@ restart:
This does what we want because fs_info::update opens the
handle without FILE_OPEN_REPARSE_POINT. */
fs.update (&upath, NULL);
+ /* Make sure the open handle is not used in later stat calls.
+ The handle has been opened with the FILE_OPEN_REPARSE_POINT
+ flag, so it's a handle to the reparse point, not a handle
+ to the volumes root dir. */
+ pflags &= ~PC_KEEP_HANDLE;
}
else if (res)
break;