Merge pull request #21899 from hrydgard/fix-homebrew

Unbreak loading homebrew. Followup to #21894, oops
This commit is contained in:
Henrik Rydgård
2026-07-08 20:25:21 +02:00
committed by GitHub
2 changed files with 13 additions and 6 deletions
+5 -5
View File
@@ -76,11 +76,6 @@ IdentifiedFileType Identify_File(FileLoader *fileLoader, std::string *errorStrin
return IdentifiedFileType::ERROR_IDENTIFYING;
}
if (!fileLoader->Exists()) {
*errorString = "IdentifyFile: File doesn't exist: " + fileLoader->GetPath().ToString();
return IdentifiedFileType::ERROR_IDENTIFYING;
}
std::string extension = fileLoader->GetFileExtension();
// First, check if it's a directory with an EBOOT.PBP in it.
@@ -106,6 +101,11 @@ IdentifiedFileType Identify_File(FileLoader *fileLoader, std::string *errorStrin
return IdentifiedFileType::NORMAL_DIRECTORY;
}
if (!fileLoader->Exists()) {
*errorString = "IdentifyFile: File doesn't exist: " + fileLoader->GetPath().ToString();
return IdentifiedFileType::ERROR_IDENTIFYING;
}
bool isDiscImage = false;
if (extension == ".iso" || extension == ".cso" || extension == ".chd") {
isDiscImage = true;
+8 -1
View File
@@ -558,7 +558,7 @@ public:
void Run() override {
// An early-return will result in the destructor running, where we can set
// flags like working and pending.
if (!info_->CreateLoader() || !info_->GetFileLoader() || !info_->GetFileLoader()->Exists()) {
if (!info_->CreateLoader() || !info_->GetFileLoader()) {
// Mark everything requested as done, so
std::unique_lock<std::mutex> lock(info_->lock);
info_->MarkReadyNoLock(flags_);
@@ -584,6 +584,13 @@ public:
}
}
if (!pbpLoader->Exists()) {
ERROR_LOG(Log::Loader, "File doesn't exist: %s\n", pbpLoader->GetPath().c_str());
std::unique_lock<std::mutex> lock(info_->lock);
info_->MarkReadyNoLock(flags_);
return;
}
PBPReader pbp(pbpLoader.get());
if (!pbp.IsValid()) {
if (pbp.IsELF()) {