Skip to content

Commit

Permalink
Merge pull request #12936 from vabold/ios-inaccuracy
Browse files Browse the repository at this point in the history
IOS: Fix return code inaccuracy
  • Loading branch information
AdmiralCurtiss authored Jul 19, 2024
2 parents 139e6f6 + c506893 commit 1fcb2ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/Core/IOS/FS/HostBackend/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
Expand Down

0 comments on commit 1fcb2ee

Please sign in to comment.