summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-06-13 23:22:47 +0200
committerLiam <byteslice@airmail.cc>2023-06-13 23:22:47 +0200
commited7c4af915744631e3e7e5646756199e192eaad5 (patch)
tree1ddf0f1350636cb1a7b4ce1c7b42f55692dbbe4f /src/core/file_sys
parentvfs_real: add simplified open file cache (diff)
downloadyuzu-ed7c4af915744631e3e7e5646756199e192eaad5.tar
yuzu-ed7c4af915744631e3e7e5646756199e192eaad5.tar.gz
yuzu-ed7c4af915744631e3e7e5646756199e192eaad5.tar.bz2
yuzu-ed7c4af915744631e3e7e5646756199e192eaad5.tar.lz
yuzu-ed7c4af915744631e3e7e5646756199e192eaad5.tar.xz
yuzu-ed7c4af915744631e3e7e5646756199e192eaad5.tar.zst
yuzu-ed7c4af915744631e3e7e5646756199e192eaad5.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/vfs_real.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp
index 13f93eecd..7a15d8438 100644
--- a/src/core/file_sys/vfs_real.cpp
+++ b/src/core/file_sys/vfs_real.cpp
@@ -81,6 +81,10 @@ VirtualFile RealVfsFilesystem::OpenFile(std::string_view path_, Mode perms) {
}
}
+ if (!FS::Exists(path) || !FS::IsFile(path)) {
+ return nullptr;
+ }
+
auto reference = std::make_unique<FileReference>();
this->InsertReferenceIntoList(*reference);