* ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
* syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as STATUS_SHARING_VIOLATION. Add lengthy comment to explain why.
This commit is contained in:
parent
8c3a79bb97
commit
03897d8dda
|
@ -1,3 +1,9 @@
|
|||
2009-04-16 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* ntdll.h (STATUS_LOCK_NOT_GRANTED): Define.
|
||||
* syscalls.cc (unlink_nt): Handle STATUS_LOCK_NOT_GRANTED same as
|
||||
STATUS_SHARING_VIOLATION. Add lengthy comment to explain why.
|
||||
|
||||
2009-04-15 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (path_conv::get_wide_win32_path): Allow relative paths.
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#define STATUS_EA_TOO_LARGE ((NTSTATUS) 0xc0000050)
|
||||
#define STATUS_NONEXISTENT_EA_ENTRY ((NTSTATUS) 0xc0000051)
|
||||
#define STATUS_NO_EAS_ON_FILE ((NTSTATUS) 0xc0000052)
|
||||
#define STATUS_LOCK_NOT_GRANTED ((NTSTATUS) 0xc0000055)
|
||||
#define STATUS_DELETE_PENDING ((NTSTATUS) 0xc0000056)
|
||||
#define STATUS_DISK_FULL ((NTSTATUS) 0xc000007f)
|
||||
#define STATUS_WORKING_SET_QUOTA ((NTSTATUS) 0xc00000a1)
|
||||
|
|
|
@ -470,8 +470,18 @@ unlink_nt (path_conv &pc)
|
|||
we can go straight to setting the delete disposition flag. */
|
||||
bin_status bin_stat = dont_move;
|
||||
status = NtOpenFile (&fh, access, &attr, &io, FILE_SHARE_DELETE, flags);
|
||||
if (status == STATUS_SHARING_VIOLATION)
|
||||
if (status == STATUS_SHARING_VIOLATION || status == STATUS_LOCK_NOT_GRANTED)
|
||||
{
|
||||
/* STATUS_LOCK_NOT_GRANTED can be generated under not quite clear
|
||||
circumstances when trying to open a file on NFS with FILE_SHARE_DELETE
|
||||
only. This has been observed with SFU 3.5 if the NFS share has been
|
||||
mounted under a drive letter. It's not generated for all files, but
|
||||
only for some. If it's generated once for a file, it will be
|
||||
generated all the time. It looks like wrong file state information
|
||||
is stored within the NFS client, for no apparent reason, which never
|
||||
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. */
|
||||
if (!pc.isremote ())
|
||||
bin_stat = move_to_bin;
|
||||
|
|
Loading…
Reference in New Issue