mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +00:00
[FASTFAT]
- Gracefully handle empty filenames found on disk, and warn about them. svn path=/trunk/; revision=70216
This commit is contained in:
parent
e828ff57bc
commit
95fa8202a5
|
@ -288,6 +288,18 @@ FindFile(
|
|||
DirContext->DirIndex++;
|
||||
continue;
|
||||
}
|
||||
if (DirContext->LongNameU.Length == 0 ||
|
||||
DirContext->ShortNameU.Length == 0)
|
||||
{
|
||||
DPRINT1("WARNING: File system corruption detected. You may need to run a disk repair utility.\n");
|
||||
if (VfatGlobalData->Flags & VFAT_BREAK_ON_CORRUPTION)
|
||||
{
|
||||
ASSERT(DirContext->LongNameU.Length != 0 &&
|
||||
DirContext->ShortNameU.Length != 0);
|
||||
}
|
||||
DirContext->DirIndex++;
|
||||
continue;
|
||||
}
|
||||
if (WildCard)
|
||||
{
|
||||
Found = FsRtlIsNameInExpression(&FileToFindUpcase, &DirContext->LongNameU, TRUE, NULL) ||
|
||||
|
|
|
@ -759,6 +759,18 @@ vfatDirFindFile(
|
|||
|
||||
if (!ENTRY_VOLUME(pDeviceExt, &DirContext.DirEntry))
|
||||
{
|
||||
if (DirContext.LongNameU.Length == 0 ||
|
||||
DirContext.ShortNameU.Length == 0)
|
||||
{
|
||||
DPRINT1("WARNING: File system corruption detected. You may need to run a disk repair utility.\n");
|
||||
if (VfatGlobalData->Flags & VFAT_BREAK_ON_CORRUPTION)
|
||||
{
|
||||
ASSERT(DirContext.LongNameU.Length != 0 &&
|
||||
DirContext.ShortNameU.Length != 0);
|
||||
}
|
||||
DirContext.DirIndex++;
|
||||
continue;
|
||||
}
|
||||
FoundLong = RtlEqualUnicodeString(FileToFindU, &DirContext.LongNameU, TRUE);
|
||||
if (FoundLong == FALSE)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue