/* FUNCTIONS ****************************************************************/
static
-PWCHAR
-NtfsGetNextPathElement(PWCHAR FileName)
+PCWSTR
+NtfsGetNextPathElement(PCWSTR FileName)
{
if (*FileName == L'\0')
{
static
VOID
NtfsWSubString(PWCHAR pTarget,
- const PWCHAR pSource,
+ PCWSTR pSource,
size_t pLength)
{
wcsncpy(pTarget, pSource, pLength);
NtfsDirFindFile(PNTFS_VCB Vcb,
PNTFS_FCB DirectoryFcb,
PWSTR FileToFind,
+ BOOLEAN CaseSensitive,
PNTFS_FCB *FoundFCB)
{
NTSTATUS Status;
PNTFS_ATTR_CONTEXT DataContext;
USHORT Length = 0;
- DPRINT1("NtfsDirFindFile(%p, %p, %S, %p)\n", Vcb, DirectoryFcb, FileToFind, FoundFCB);
+ DPRINT1("NtfsDirFindFile(%p, %p, %S, %s, %p)\n",
+ Vcb,
+ DirectoryFcb,
+ FileToFind,
+ CaseSensitive ? "TRUE" : "FALSE",
+ FoundFCB);
*FoundFCB = NULL;
RtlInitUnicodeString(&File, FileToFind);
DPRINT1("Will now look for file '%wZ' with stream '%S'\n", &File, Colon);
}
- Status = NtfsLookupFileAt(Vcb, &File, &FileRecord, &MFTIndex, CurrentDir);
+ Status = NtfsLookupFileAt(Vcb, &File, CaseSensitive, &FileRecord, &MFTIndex, CurrentDir);
if (!NT_SUCCESS(Status))
{
return Status;
NtfsGetFCBForFile(PNTFS_VCB Vcb,
PNTFS_FCB *pParentFCB,
PNTFS_FCB *pFCB,
- const PWSTR pFileName)
+ PCWSTR pFileName,
+ BOOLEAN CaseSensitive)
{
NTSTATUS Status;
WCHAR pathName [MAX_PATH];
WCHAR elementName [MAX_PATH];
- PWCHAR currentElement;
+ PCWSTR currentElement;
PNTFS_FCB FCB;
PNTFS_FCB parentFCB;
- DPRINT("NtfsGetFCBForFile(%p, %p, %p, '%S')\n",
+ DPRINT("NtfsGetFCBForFile(%p, %p, %p, '%S', %s)\n",
Vcb,
pParentFCB,
pFCB,
- pFileName);
+ pFileName,
+ CaseSensitive ? "TRUE" : "FALSE");
/* Dummy code */
// FCB = NtfsOpenRootFCB(Vcb);
NtfsGetNextPathElement(currentElement) - currentElement);
DPRINT(" elementName:%S\n", elementName);
- Status = NtfsDirFindFile(Vcb, parentFCB, elementName, &FCB);
+ Status = NtfsDirFindFile(Vcb, parentFCB, elementName, CaseSensitive, &FCB);
if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
{
*pParentFCB = parentFCB;