mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Savestate: Fix reopening files on load
Drop an ISO handle whose file isn't in the loaded image instead of keeping a null file, and don't reopen a directory file with exclusive create. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
cd94e414cd
commit
fc32d79596
2 files changed
+8
-1
No files matched your search
@@ -857,6 +857,12 @@ void ISOFileSystem::DoState(PointerWrap &p) {
|
||||
std::string path;
|
||||
Do(p, path);
|
||||
of.file = GetFromPath(path);
|
||||
if (!of.file) {
|
||||
// Loaded against a different image. Like a file that's gone from a directory,
|
||||
// drop the handle rather than keep one that points at nothing.
|
||||
ERROR_LOG(Log::FileSystem, "Failed to reopen file while loading state: %s", path.c_str());
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
of.file = NULL;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user