IOS: Fix return code inaccuracy
Co-Authored-By: Mike <[email protected]>
This commit is contained in:
1 parent
549b16d442
commit
c50689355b
1 file changed
+6
@@ -81,6 +81,12 @@ Result<FileHandle> HostFileSystem::OpenFile(Uid, Gid, const std::string& path, M
|
|||||||
return ResultCode::NoFreeHandle;
|
return ResultCode::NoFreeHandle;
|
||||||
|
|
||||||
const std::string host_path = BuildFilename(path).host_path;
|
const std::string host_path = BuildFilename(path).host_path;
|
||||||
|
if (File::IsDirectory(host_path))
|
||||||
|
{
|
||||||
|
*handle = Handle{};
|
||||||
|
return ResultCode::Invalid;
|
||||||
|
}
|
||||||
|
|
||||||
if (!File::IsFile(host_path))
|
if (!File::IsFile(host_path))
|
||||||
{
|
{
|
||||||
*handle = Handle{};
|
*handle = Handle{};
|
||||||
|
|||||||
Reference in new issue
Block a user