Author: pschweitzer
Date: Mon Oct 27 12:35:58 2014
New Revision: 65041
URL:
http://svn.reactos.org/svn/reactos?rev=65041&view=rev
Log:
[NTFS]
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
Modified:
trunk/reactos/drivers/filesystems/ntfs/mft.c
Modified: trunk/reactos/drivers/filesystems/ntfs/mft.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/mft.c [iso-8859-1] Mon Oct 27 12:35:58 2014
@@ -469,7 +469,7 @@
EntryName.Buffer = IndexEntry->FileName.Name;
EntryName.Length =
- EntryName.MaximumLength = IndexEntry->FileName.NameLength;
+ EntryName.MaximumLength = IndexEntry->FileName.NameLength * sizeof(WCHAR);
if (DirSearch)
{
@@ -477,7 +477,7 @@
}
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);
}
}
@@ -702,7 +702,7 @@
}
if (Remaining.Length == 0)
- return STATUS_OBJECT_PATH_NOT_FOUND;
+ break;
FsRtlDissectName(Current, &Current, &Remaining);
}