hotfix : check if dir exists

This commit is contained in:
georgemoralis 2024-10-31 17:05:44 +02:00
parent 8d15388aeb
commit 67dfc7916c

View file

@ -308,9 +308,13 @@ void Emulator::LoadSystemModules(const std::filesystem::path& file, std::string
LOG_INFO(Loader, "No HLE available for {} module", module_name); LOG_INFO(Loader, "No HLE available for {} module", module_name);
} }
} }
for (const auto& entry : std::filesystem::directory_iterator(sys_module_path / game_serial)) { if (std::filesystem::exists(sys_module_path / game_serial)) {
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(), game_serial); for (const auto& entry :
linker->LoadModule(entry.path()); std::filesystem::directory_iterator(sys_module_path / game_serial)) {
LOG_INFO(Loader, "Loading {} from game serial file {}", entry.path().string(),
game_serial);
linker->LoadModule(entry.path());
}
} }
} }