summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-07-15 18:16:31 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-07-16 06:15:27 +0200
commit2079bb4090b97b87faf69b3a32f8c115de61002e (patch)
treebba0fddafbd717cf4b89c0e76783e5dd0be4e42f
parentMerge pull request #4328 from lioncash/unused-var3 (diff)
downloadyuzu-2079bb4090b97b87faf69b3a32f8c115de61002e.tar
yuzu-2079bb4090b97b87faf69b3a32f8c115de61002e.tar.gz
yuzu-2079bb4090b97b87faf69b3a32f8c115de61002e.tar.bz2
yuzu-2079bb4090b97b87faf69b3a32f8c115de61002e.tar.lz
yuzu-2079bb4090b97b87faf69b3a32f8c115de61002e.tar.xz
yuzu-2079bb4090b97b87faf69b3a32f8c115de61002e.tar.zst
yuzu-2079bb4090b97b87faf69b3a32f8c115de61002e.zip
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index cadc03805..3020101a1 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -55,6 +55,9 @@ std::string VfsDirectoryServiceWrapper::GetName() const {
ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64 size) const {
std::string path(FileUtil::SanitizePath(path_));
auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path));
+ if (dir == nullptr) {
+ dir = backing->CreateSubdirectory(FileUtil::GetParentPath(path));
+ }
auto file = dir->CreateFile(FileUtil::GetFilename(path));
if (file == nullptr) {
// TODO(DarkLordZach): Find a better error code for this