mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04: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:
parent
c7b3a08cf3
commit
45516783f6
1 changed files with 5 additions and 5 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Reference in a new issue