mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 21:45:41 +00:00
[NTFS] - Fix AddFileName() when the file path is two or more directories deep.
svn path=/branches/GSoC_2016/NTFS/; revision=75277
This commit is contained in:
parent
16204ed3a7
commit
612facc28f
1 changed files with 3 additions and 2 deletions
|
@ -146,7 +146,7 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
||||||
ULONGLONG CurrentMFTIndex = NTFS_FILE_ROOT;
|
ULONGLONG CurrentMFTIndex = NTFS_FILE_ROOT;
|
||||||
UNICODE_STRING Current, Remaining, FilenameNoPath;
|
UNICODE_STRING Current, Remaining, FilenameNoPath;
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
ULONG FirstEntry = 0;
|
ULONG FirstEntry;
|
||||||
WCHAR Buffer[MAX_PATH];
|
WCHAR Buffer[MAX_PATH];
|
||||||
|
|
||||||
if (AttributeAddress->Type != AttributeEnd)
|
if (AttributeAddress->Type != AttributeEnd)
|
||||||
|
@ -183,6 +183,7 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
||||||
if(Remaining.Length != 0)
|
if(Remaining.Length != 0)
|
||||||
RtlCopyUnicodeString(&FilenameNoPath, &Remaining);
|
RtlCopyUnicodeString(&FilenameNoPath, &Remaining);
|
||||||
|
|
||||||
|
FirstEntry = 0;
|
||||||
Status = NtfsFindMftRecord(DeviceExt,
|
Status = NtfsFindMftRecord(DeviceExt,
|
||||||
CurrentMFTIndex,
|
CurrentMFTIndex,
|
||||||
&Current,
|
&Current,
|
||||||
|
@ -200,7 +201,7 @@ AddFileName(PFILE_RECORD_HEADER FileRecord,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
FsRtlDissectName(Current, &Current, &Remaining);
|
FsRtlDissectName(Remaining, &Current, &Remaining);
|
||||||
}
|
}
|
||||||
|
|
||||||
DPRINT1("MFT Index of parent: %I64u\n", CurrentMFTIndex);
|
DPRINT1("MFT Index of parent: %I64u\n", CurrentMFTIndex);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue