From 1e717ab046643050d8d7a9c22d9f8ff69412670a Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 28 Jun 2024 23:06:15 +0300 Subject: [PATCH] sceKernelOpen handle directory doesn't exist case --- src/core/libraries/kernel/file_system.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 0adb058e..f0556df8 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -59,7 +59,8 @@ int PS4_SYSV_ABI sceKernelOpen(const char* path, int flags, u16 mode) { file->m_guest_name = path; file->m_host_name = mnt->GetHostDirectory(file->m_guest_name); if (!std::filesystem::is_directory(file->m_host_name)) { // directory doesn't exist - UNREACHABLE(); // not supported yet + h->DeleteHandle(handle); + return ORBIS_KERNEL_ERROR_ENOTDIR; } else { if (create) { return handle; // dir already exists