Bugfixing... Part 10/X:
- Properly compute entry name length in CompareFileName()
- Also, in CompareFileName() properly handle the return of RtlCompareUnicodeString(); this is not RtlEqualUnicodeString()!
- In NtfsLookupFileAt(), don't return an error when we're done walking the path, it's a normal behavior
All these fixes allow our NTFS to go one step farther: it can open directory/files (reading files data remains untested so far) in root and in its subdirs. Which was broken previously.
The said bugfixes in action (and in image): http://www.heisspiter.net/~Pierre/rostests/NTFS_listing_subdir.png
svn path=/trunk/; revision=65041
EntryName.Buffer = IndexEntry->FileName.Name;
EntryName.Length =
- EntryName.MaximumLength = IndexEntry->FileName.NameLength;
+ EntryName.MaximumLength = IndexEntry->FileName.NameLength * sizeof(WCHAR);
if (DirSearch)
{
}
else
{
- return (RtlCompareUnicodeString(FileName, &EntryName, (IndexEntry->FileName.NameType != NTFS_FILE_NAME_POSIX)) == TRUE);
+ return (RtlCompareUnicodeString(FileName, &EntryName, (IndexEntry->FileName.NameType != NTFS_FILE_NAME_POSIX)) == 0);
}
}
}
if (Remaining.Length == 0)
- return STATUS_OBJECT_PATH_NOT_FOUND;
+ break;
FsRtlDissectName(Current, &Current, &Remaining);
}