From 340460f01ceba7dd1c0ac9efec1fb596957a9c5c Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 6 Nov 2018 19:28:22 -0800 Subject: [PATCH] Io: Add missing error code on file open. Doesn't affect Windows. --- Core/FileSystems/DirectoryFileSystem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Core/FileSystems/DirectoryFileSystem.cpp b/Core/FileSystems/DirectoryFileSystem.cpp index 27a15f352..20dc6565c 100644 --- a/Core/FileSystems/DirectoryFileSystem.cpp +++ b/Core/FileSystems/DirectoryFileSystem.cpp @@ -281,8 +281,10 @@ bool DirectoryFileHandle::Open(std::string &basePath, std::string &fileName, Fil #if HOST_IS_CASE_SENSITIVE if (!success && !(access & FILEACCESS_CREATE)) { - if (!FixPathCase(basePath,fileName, FPC_PATH_MUST_EXIST) ) - return 0; // or go on and attempt (for a better error code than just 0?) + if (!FixPathCase(basePath, fileName, FPC_PATH_MUST_EXIST)) { + error = SCE_KERNEL_ERROR_ERRNO_FILE_NOT_FOUND; + return false; + } fullName = GetLocalPath(basePath,fileName); const char *fullNameC = fullName.c_str();