mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 08:14:45 +02:00
Io: Return error code for write attempt to UMD.
Previously, we were returning file not found (because 0), which was not correct. We were also allowing write handles to sce_lbn.
This commit is contained in:
@@ -335,6 +335,11 @@ u32 ISOFileSystem::OpenFile(std::string filename, FileAccess access, const char
|
||||
entry.isRawSector = false;
|
||||
entry.isBlockSectorMode = false;
|
||||
|
||||
if (access & FILEACCESS_WRITE) {
|
||||
ERROR_LOG(FILESYS, "Can't open file %s with write access on an ISO partition", filename.c_str());
|
||||
return SCE_KERNEL_ERROR_ERRNO_INVALID_FLAG;
|
||||
}
|
||||
|
||||
if (filename.compare(0, 8, "/sce_lbn") == 0) {
|
||||
// Raw sector read.
|
||||
u32 sectorStart = 0xFFFFFFFF, readSize = 0xFFFFFFFF;
|
||||
@@ -364,11 +369,6 @@ u32 ISOFileSystem::OpenFile(std::string filename, FileAccess access, const char
|
||||
return newHandle;
|
||||
}
|
||||
|
||||
if (access & FILEACCESS_WRITE) {
|
||||
ERROR_LOG(FILESYS, "Can't open file %s with write access on an ISO partition", filename.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
// May return entireISO for "umd0:"
|
||||
entry.file = GetFromPath(filename);
|
||||
if (!entry.file){
|
||||
|
||||
Reference in New Issue
Block a user