mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[FASTFAT] Don't add an extra \, when renaming a file at root.
This fixes failures to rename a file where destination is the root of a FAT volume. CORE-10503
This commit is contained in:
parent
6aa4beeefb
commit
52f0f80a83
1 changed files with 6 additions and 2 deletions
|
@ -787,8 +787,12 @@ VfatSetRenameInformation(
|
|||
}
|
||||
|
||||
RtlCopyUnicodeString(&NewName, &((PVFATFCB)TargetFileObject->FsContext)->PathNameU);
|
||||
NewName.Buffer[NewName.Length / sizeof(WCHAR)] = L'\\';
|
||||
NewName.Length += sizeof(WCHAR);
|
||||
/* If \, it's already backslash terminated, don't add it */
|
||||
if (!vfatFCBIsRoot(TargetFileObject->FsContext))
|
||||
{
|
||||
NewName.Buffer[NewName.Length / sizeof(WCHAR)] = L'\\';
|
||||
NewName.Length += sizeof(WCHAR);
|
||||
}
|
||||
RtlAppendUnicodeStringToString(&NewName, &TargetFileObject->FileName);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue