mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-23 23:34:46 +02:00
Avoid some unnecessary error reporting while loading ISOs for the file browser
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user