summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-07-19 21:27:07 +0200
committerGitHub <noreply@github.com>2024-07-19 21:27:07 +0200
commit1fcb2ee5c12eb9a3552fcb6ea7dd2fcd7c6c1749 (patch)
tree6eeeeb4a3cf6d195a2fdb9c9c419d133d5ba210e /Source/Core
parent139e6f6f1b748211c0bd4d13d03e7ef433bee670 (diff)
parentc50689355b83cab69bb20851919babff2808a4ae (diff)
Merge pull request #12936 from vabold/ios-inaccuracy
IOS: Fix return code inaccuracy
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/IOS/FS/HostBackend/File.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/Core/IOS/FS/HostBackend/File.cpp b/Source/Core/Core/IOS/FS/HostBackend/File.cpp
index 9f58c2fffa..1379ebc049 100644
--- a/Source/Core/Core/IOS/FS/HostBackend/File.cpp
+++ b/Source/Core/Core/IOS/FS/HostBackend/File.cpp
@@ -81,6 +81,12 @@ Result<FileHandle> HostFileSystem::OpenFile(Uid, Gid, const std::string& path, M
return ResultCode::NoFreeHandle;
const std::string host_path = BuildFilename(path).host_path;
+ if (File::IsDirectory(host_path))
+ {
+ *handle = Handle{};
+ return ResultCode::Invalid;
+ }
+
if (!File::IsFile(host_path))
{
*handle = Handle{};