diff --git a/src/core/libraries/kernel/file_system.cpp b/src/core/libraries/kernel/file_system.cpp index 02b833969..46abb786d 100644 --- a/src/core/libraries/kernel/file_system.cpp +++ b/src/core/libraries/kernel/file_system.cpp @@ -130,9 +130,7 @@ s32 PS4_SYSV_ABI open(const char* raw_path, s32 flags, u16 mode) { } // Create file if it doesn't exist Common::FS::IOFile out(file->m_host_name, Common::FS::FileAccessMode::Write); - } - - if (!exists) { + } else if (!exists) { // File to open doesn't exist, return ENOENT h->DeleteHandle(handle); *__Error() = POSIX_ENOENT;