- AnsiFirstName.MaximumLength = FirstName.Length;
- Status = RtlUpcaseUnicodeStringToCountedOemString(&AnsiFirstName, &FirstName, FALSE);
-
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("RtlUpcaseUnicodeStringToCountedOemString() failed with 0x%08x\n", Status);
- ASSERT(FALSE);
- NextFcb = NULL;
- AnsiFirstName.Length = 0;
- }
- else
- {
- /* Find the coresponding FCB */
- NextFcb = FatFindFcb(IrpContext,
- &Fcb->Dcb.SplayLinksAnsi,
- (PSTRING)&AnsiFirstName,
- &OpenedAsDos);
- }
-
- /* If nothing found - try with unicode */
- if (!NextFcb && Fcb->Dcb.SplayLinksUnicode)
- {
- FileNameUpcased.Buffer = FsRtlAllocatePool(PagedPool, FirstName.Length);
- FileNameUpcased.Length = 0;
- FileNameUpcased.MaximumLength = FirstName.Length;
-
- /* Downcase and then upcase to normalize it */
- Status = RtlDowncaseUnicodeString(&FileNameUpcased, &FirstName, FALSE);
- Status = RtlUpcaseUnicodeString(&FileNameUpcased, &FileNameUpcased, FALSE);
-
- /* Try to find FCB again using unicode name */
- NextFcb = FatFindFcb(IrpContext,
- &Fcb->Dcb.SplayLinksUnicode,
- (PSTRING)&FileNameUpcased,
- &OpenedAsDos);
- }
-
- /* Move to the next FCB */
- if (NextFcb)
- {
- Fcb = NextFcb;
- RemainingPart = NextName;
- }
+ }
+ else
+ {
+ /* Find the coresponding FCB */
+ NextFcb = FatFindFcb(IrpContext,
+ &Fcb->Dcb.SplayLinksAnsi,
+ (PSTRING)&AnsiFirstName,
+ &OpenedAsDos);
+ }