Author: tthompson
Date: Tue Jul 4 20:47:06 2017
New Revision: 75277
URL:
http://svn.reactos.org/svn/reactos?rev=75277&view=rev
Log:
[NTFS] - Fix AddFileName() when the file path is two or more directories deep.
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] Tue Jul 4
20:47:06 2017
@@ -146,7 +146,7 @@
ULONGLONG CurrentMFTIndex = NTFS_FILE_ROOT;
UNICODE_STRING Current, Remaining, FilenameNoPath;
NTSTATUS Status = STATUS_SUCCESS;
- ULONG FirstEntry = 0;
+ ULONG FirstEntry;
WCHAR Buffer[MAX_PATH];
if (AttributeAddress->Type != AttributeEnd)
@@ -183,6 +183,7 @@
if(Remaining.Length != 0)
RtlCopyUnicodeString(&FilenameNoPath, &Remaining);
+ FirstEntry = 0;
Status = NtfsFindMftRecord(DeviceExt,
CurrentMFTIndex,
&Current,
@@ -200,7 +201,7 @@
break;
}
- FsRtlDissectName(Current, &Current, &Remaining);
+ FsRtlDissectName(Remaining, &Current, &Remaining);
}
DPRINT1("MFT Index of parent: %I64u\n", CurrentMFTIndex);