mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTFS] - Add some improvements to the previous commit, as suggested by Thomas.
svn path=/branches/GSoC_2016/NTFS/; revision=75054
This commit is contained in:
parent
e0048b1362
commit
9dce6f4db1
1 changed files with 2 additions and 4 deletions
|
@ -167,9 +167,7 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
|||
// we need to extract the filename from the path
|
||||
DPRINT1("Pathname: %wZ\n", &FileObject->FileName);
|
||||
|
||||
RtlZeroMemory(&FilenameNoPath, sizeof(UNICODE_STRING));
|
||||
FilenameNoPath.Buffer = Buffer;
|
||||
FilenameNoPath.MaximumLength = MAX_PATH;
|
||||
RtlInitEmptyUnicodeString(&FilenameNoPath, Buffer, MAX_PATH);
|
||||
|
||||
FsRtlDissectName(FileObject->FileName, &Current, &Remaining);
|
||||
|
||||
|
@ -210,7 +208,7 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
|||
|
||||
DPRINT1("FileNameAttribute->DirectoryFileReferenceNumber: 0x%016I64x\n", FileNameAttribute->DirectoryFileReferenceNumber);
|
||||
|
||||
FileNameAttribute->NameLength = FilenameNoPath.Length / 2;
|
||||
FileNameAttribute->NameLength = FilenameNoPath.Length / sizeof(WCHAR);
|
||||
// TODO: Get proper nametype, add DOS links as needed
|
||||
FileNameAttribute->NameType = NTFS_FILE_NAME_WIN32_AND_DOS;
|
||||
RtlCopyMemory(FileNameAttribute->Name, FilenameNoPath.Buffer, FilenameNoPath.Length);
|
||||
|
|
Loading…
Reference in a new issue