Avoid some unnecessary error reporting while loading ISOs for the file browser

This commit is contained in:
Henrik Rydgård
2026-05-31 23:31:06 +02:00
parent 21e4677305
commit e9d5e451fb
3 changed files with 22 additions and 10 deletions
+10 -6
View File
@@ -154,8 +154,17 @@ ISOFileSystem::ISOFileSystem(IHandleAllocator *_hAlloc, std::shared_ptr<BlockDev
hAlloc = _hAlloc;
VolDescriptor desc;
if (!blockDevice->ReadBlock(16, (u8*)&desc))
if (!blockDevice->ReadBlock(16, (u8*)&desc)) {
// TODO: This is kinda wacky.
blockDevice->NotifyReadError();
errorString_ = "ISO: error reading volume descriptor";
return;
}
if (memcmp(desc.cd001, "CD001", 5)) {
errorString_ = "ISO: missing CD001 signature";
return;
}
entireISO.name.clear();
entireISO.isDirectory = false;
@@ -172,11 +181,6 @@ ISOFileSystem::ISOFileSystem(IHandleAllocator *_hAlloc, std::shared_ptr<BlockDev
treeroot->parent = NULL;
treeroot->valid = false;
if (memcmp(desc.cd001, "CD001", 5)) {
ERROR_LOG(Log::FileSystem, "ISO looks bogus, expected CD001 signature not present? Giving up...");
return;
}
treeroot->startsector = desc.root.firstDataSector;
treeroot->dirsize = desc.root.dataLength;
}