Author: hpoussin
Date: Sun Nov 2 18:58:16 2014
New Revision: 65190
URL:
http://svn.reactos.org/svn/reactos?rev=65190&view=rev
Log:
[NTFS] Fix directory listing with search pattern
This fixes name completion in command prompt.
Modified:
trunk/reactos/drivers/filesystems/ntfs/dirctl.c
Modified: trunk/reactos/drivers/filesystems/ntfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] Sun Nov 2 18:58:16 2014
@@ -305,6 +305,7 @@
PNTFS_FCB Fcb;
PNTFS_CCB Ccb;
BOOLEAN First = FALSE;
+ BOOLEAN WildCard;
PIO_STACK_LOCATION Stack;
PFILE_OBJECT FileObject;
NTSTATUS Status = STATUS_SUCCESS;
@@ -364,6 +365,16 @@
}
RtlInitUnicodeString(&Pattern, Ccb->DirectorySearchPattern);
+ WildCard = FsRtlDoesNameContainWildCards(&Pattern);
+ if (WildCard)
+ {
+ Status = RtlUpcaseUnicodeString(&Pattern, &Pattern, FALSE);
+ if (!NT_SUCCESS(Status))
+ {
+ DPRINT1("RtlUpcaseUnicodeString('%wZ') failed with status
0x%08lx\n", &Pattern, Status);
+ return Status;
+ }
+ }
DPRINT1("Search pattern '%S'\n", Ccb->DirectorySearchPattern);
DPRINT1("In: '%S'\n", Fcb->PathName);