mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-02 16:53:17 +00:00
posix_open fixups
This commit is contained in:
parent
4a4589a1e9
commit
671cbfbbd0
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue