diff --git a/Source/Core/Core/IOS/FS/HostBackend/FS.cpp b/Source/Core/Core/IOS/FS/HostBackend/FS.cpp index 2b2cf16be1..cf9a50396e 100644 --- a/Source/Core/Core/IOS/FS/HostBackend/FS.cpp +++ b/Source/Core/Core/IOS/FS/HostBackend/FS.cpp @@ -771,7 +771,12 @@ Result HostFileSystem::GetDirectoryStats(const std::string& wii_ DirectoryStats stats{}; std::string path(BuildFilename(wii_path).host_path); - if (File::IsDirectory(path)) + File::FileInfo info(path); + if (!info.Exists()) + { + return ResultCode::NotFound; + } + if (info.IsDirectory()) { File::FSTEntry parent_dir = File::ScanDirectoryTree(path, true); // add one for the folder itself @@ -783,7 +788,7 @@ Result HostFileSystem::GetDirectoryStats(const std::string& wii_ } else { - WARN_LOG_FMT(IOS_FS, "fsBlock failed, cannot find directory: {}", path); + return ResultCode::Invalid; } return stats; }