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
@@ -1093,7 +1093,8 @@ void DirectoryFileSystem::DoState(PointerWrap &p) {
|
||||
Do(p, entry.guestFilename);
|
||||
Do(p, entry.access);
|
||||
u32 err;
|
||||
bool opened = entry.hFile.Open(basePath, entry.guestFilename, entry.access, err);
|
||||
// The original open created the file, so an exclusive create would fail now.
|
||||
bool opened = entry.hFile.Open(basePath, entry.guestFilename, (FileAccess)(entry.access & ~FILEACCESS_EXCL), err);
|
||||
bool brokenFile = !opened;
|
||||
if (!opened) {
|
||||
ERROR_LOG(Log::FileSystem, "Failed to reopen file while loading state: %s", entry.guestFilename.c_str());
|
||||
|
||||
Reference in new issue
Block a user