diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2009-07-17 16:45:22 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2009-07-17 16:45:22 +0000 |
commit | 8319377680efac1de4ee3c1dee37c1494042304b (patch) | |
tree | 4ccf85d635c41c84dc0c9e1822f9367c565c9140 | |
parent | 0bf9a206448cf81d53d4b16744a928967f6c457f (diff) | |
download | cygnal-8319377680efac1de4ee3c1dee37c1494042304b.tar.gz cygnal-8319377680efac1de4ee3c1dee37c1494042304b.tar.bz2 cygnal-8319377680efac1de4ee3c1dee37c1494042304b.zip |
* syscalls.cc (unlink_nt): Just return when a sharing violation
occurs on remote filesystems.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7f4abc994..71dbae4ed 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2009-07-17 Corinna Vinschen <corinna@vinschen.de> + * syscalls.cc (unlink_nt): Just return when a sharing violation + occurs on remote filesystems. + +2009-07-17 Corinna Vinschen <corinna@vinschen.de> + * globals.cc: Improve comment on R/O UNICODE_STRINGs. * mount.h (class fs_info): Add is_mvfs bit. * mount.cc (fs_info::update): Recognize MVFS remote filesystem. diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 14dd884b1..6f2de057a 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -497,7 +497,19 @@ unlink_nt (path_conv &pc) times out. Opening the file with FILE_SHARE_VALID_FLAGS will work, though, and it is then possible to delete the file quite normally. */ - /* Bin is only accessible locally. */ + /* The recycle bin is only accessible locally. For in-use remote + files we drop back to just returning EBUSY. */ + if (pc.isremote () && status == STATUS_SHARING_VIOLATION) + { + if (fh_ro) + { + /* Try to reset R/O attribute and close handle. */ + NtSetAttributesFile (fh_ro, pc.file_attributes ()); + NtClose (fh_ro); + } + return status; + } + /* Only local FS and NFS w/ STATUS_LOCK_NOT_GRANTED should arrive here. */ if (!pc.isremote ()) bin_stat = move_to_bin; if (!pc.isdir () || pc.isremote ()) |