Merge pull request #12936 from vabold/ios-inaccuracy

IOS: Fix return code inaccuracy
This commit is contained in:
Admiral H. Curtiss 2024-07-19 21:27:07 +02:00 committed by GitHub
commit 1fcb2ee5c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -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{};