winfsp-tests: memfs: Rename

This commit is contained in:
Bill Zissimopoulos 2016-02-10 21:04:20 -08:00
parent 0cc5468764
commit fc790a4c3e

View File

@ -512,12 +512,12 @@ NTSTATUS Rename(FSP_FILE_SYSTEM *FileSystem,
NewFileNode = MemfsFileNodeMapGet(Memfs->FileNodeMap, NewFileName);
if (0 != NewFileNode)
{
if (!ReplaceIfExists)
return STATUS_OBJECT_NAME_COLLISION;
if (NewFileNode->FileInfo.FileAttributes & FILE_ATTRIBUTE_DIRECTORY)
return STATUS_ACCESS_DENIED;
if (ReplaceIfExists)
return STATUS_OBJECT_NAME_COLLISION;
NewFileNode->RefCount++;
MemfsFileNodeMapRemove(Memfs->FileNodeMap, NewFileNode);
if (0 == --NewFileNode->RefCount)