summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-10-18 16:22:14 +0200
committerCorinna Vinschen <corinna@vinschen.de>2017-10-18 16:22:14 +0200
commit5b7921523da00d81aaa0af829fbd8c5fe36e1e56 (patch)
tree0c92aa2d77ad8150d931fdb94e275308c61052f0
parente6c79e7a2ab7fe9e1d45c25526841e035ee67407 (diff)
downloadcygnal-5b7921523da00d81aaa0af829fbd8c5fe36e1e56.tar.gz
cygnal-5b7921523da00d81aaa0af829fbd8c5fe36e1e56.tar.bz2
cygnal-5b7921523da00d81aaa0af829fbd8c5fe36e1e56.zip
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>
-rw-r--r--winsup/cygwin/syscalls.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 8ccc7681e..8124df91d 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.