mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tst: ntptfs: fix Rename on versions of the OS without POSIX rename
This commit is contained in:
parent
627ad8be8c
commit
c306a52d19
@ -654,13 +654,15 @@ static NTSTATUS Rename(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
65/*FileRenameInformationEx*/);
|
65/*FileRenameInformationEx*/);
|
||||||
if (!NT_SUCCESS(Result))
|
if (!NT_SUCCESS(Result))
|
||||||
{
|
{
|
||||||
if (STATUS_OBJECT_NAME_COLLISION == Result && ReplaceIfExists && !PosixReplaceIfExists)
|
switch (Result)
|
||||||
{
|
{
|
||||||
Result = STATUS_ACCESS_DENIED;
|
case STATUS_OBJECT_NAME_COLLISION:
|
||||||
|
if (ReplaceIfExists && !PosixReplaceIfExists)
|
||||||
|
Result = STATUS_ACCESS_DENIED;
|
||||||
|
goto exit;
|
||||||
|
case STATUS_ACCESS_DENIED:
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (STATUS_INVALID_PARAMETER != Result)
|
|
||||||
goto exit;
|
|
||||||
|
|
||||||
FileRenInfo.V.Flags = 0;
|
FileRenInfo.V.Flags = 0;
|
||||||
FileRenInfo.V.ReplaceIfExists = ReplaceIfExists;
|
FileRenInfo.V.ReplaceIfExists = ReplaceIfExists;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user