mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-25 03:25:17 +00:00
posix_open fixups
This commit is contained in:
parent
4a4589a1e9
commit
671cbfbbd0
@ -123,6 +123,7 @@ s32 PS4_SYSV_ABI posix_open(const char* raw_path, s32 flags, u16 mode) {
|
||||
if (create) {
|
||||
if (excl && std::filesystem::exists(file->m_host_name)) {
|
||||
// Error if file exists
|
||||
h->DeleteHandle(handle);
|
||||
*__Error() = POSIX_EEXIST;
|
||||
return -1;
|
||||
}
|
||||
@ -157,8 +158,8 @@ s32 PS4_SYSV_ABI posix_open(const char* raw_path, s32 flags, u16 mode) {
|
||||
}
|
||||
|
||||
if (e != 0) {
|
||||
h->DeleteHandle(handle);
|
||||
// IOFile code uses platform specific errnos, they must be converted to POSIX errnos.
|
||||
h->DeleteHandle(handle);
|
||||
SetPosixErrno(e);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user