mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Merge pull request #21899 from hrydgard/fix-homebrew
Unbreak loading homebrew. Followup to #21894, oops
This commit is contained in:
+5
-5
@@ -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;
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user