public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] cygwin: unlink: don't try "final trick" in try_to_bin on NFS
@ 2017-10-18 14:29 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2017-10-18 14:29 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5b7921523da00d81aaa0af829fbd8c5fe36e1e56
commit 5b7921523da00d81aaa0af829fbd8c5fe36e1e56
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Oct 18 16:22:14 2017 +0200
cygwin: unlink: don't try "final trick" in try_to_bin on NFS
Doesn't work. Just another STATUS_SHARING_VIOLATION.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/syscalls.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 8ccc768..8124df9 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -532,8 +532,8 @@ try_to_bin (path_conv &pc, HANDLE &fh, ACCESS_MASK access, ULONG flags)
NtClose (fh);
fh = NULL; /* So unlink_nt doesn't close the handle twice. */
/* On success or when trying to unlink a directory we just return here.
- The below code only works for files. */
- if (NT_SUCCESS (status) || pc.isdir ())
+ The below code only works for files. It also fails on NFS. */
+ if (NT_SUCCESS (status) || pc.isdir () || pc.fs_is_nfs ())
goto out;
/* The final trick. We create a temporary file with delete-on-close
semantic and rename that file to the file just moved to the bin.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-18 14:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 14:29 [newlib-cygwin] cygwin: unlink: don't try "final trick" in try_to_bin on NFS Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).