Author: tthompson
Date: Fri Jun 16 05:42:01 2017
New Revision: 75054
URL:
http://svn.reactos.org/svn/reactos?rev=75054&view=rev
Log:
[NTFS] - Add some improvements to the previous commit, as suggested by Thomas.
Modified:
branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c
Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
==============================================================================
--- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original)
+++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Fri Jun 16
05:42:01 2017
@@ -167,9 +167,7 @@
// 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 @@
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);