From 8d17f87a08618afc9cf91d98eef2eb35b0f6eabf Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 4 Jul 2024 11:38:23 +0300 Subject: [PATCH] improved file not found return in sceKernelOpen --- src/core/libraries/kernel/file_system.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 718da18f..3c5c0ac9 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -90,7 +90,11 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) { } if (!file->f.IsOpen()) { h->DeleteHandle(handle); - return SCE_KERNEL_ERROR_EACCES; + if (create) { + return ORBIS_KERNEL_ERROR_EACCES; + } else { + return ORBIS_KERNEL_ERROR_ENOENT; + } } } file->is_opened = true;