summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/syscalls.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 4f91f4b48..728a6b1e5 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -389,6 +389,8 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags)
&recycler, status);
goto out;
}
+ /* Correct the rootdir HANDLE in pfri after reopening the dir. */
+ pfri->RootDirectory = rootdir;
/* Then check if recycler exists by opening and potentially creating it.
Yes, we can really do that. Typically the recycle bin is created
by the first user actually using the bin. */