summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/IOS/FS/HostBackend/File.cpp6
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{};