diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2024-07-19 21:27:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-19 21:27:07 +0200 |
| commit | 1fcb2ee5c12eb9a3552fcb6ea7dd2fcd7c6c1749 (patch) | |
| tree | 6eeeeb4a3cf6d195a2fdb9c9c419d133d5ba210e /Source/Core | |
| parent | 139e6f6f1b748211c0bd4d13d03e7ef433bee670 (diff) | |
| parent | c50689355b83cab69bb20851919babff2808a4ae (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.cpp | 6 |
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{}; |
