diff options
| author | Aiden <86704247+vabold@users.noreply.github.com> | 2024-07-15 16:11:15 -0400 |
|---|---|---|
| committer | Aiden <86704247+vabold@users.noreply.github.com> | 2024-07-15 16:11:15 -0400 |
| commit | c50689355b83cab69bb20851919babff2808a4ae (patch) | |
| tree | ee0c404b5c4c60c5328d5ff5263d97ad14b4e76c /Source | |
| parent | 549b16d442dba0d87406a2e5a79c1e576fa7f725 (diff) | |
IOS: Fix return code inaccuracy
Co-Authored-By: Mike <99037623+MikeIsAStar@users.noreply.github.com>
Diffstat (limited to 'Source')
| -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{}; |
