summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6aa4bee)
This fixes failures to rename a file where destination is
the root of a FAT volume.
CORE-10503
}
RtlCopyUnicodeString(&NewName, &((PVFATFCB)TargetFileObject->FsContext)->PathNameU);
}
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);
}
RtlAppendUnicodeStringToString(&NewName, &TargetFileObject->FileName);
}