summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/filesystem
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-07-15 19:08:04 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-07-16 06:15:27 +0200
commit5892fc1555d45a7e6382a07252d232019dd5978d (patch)
tree39ea0b1e974c2b476403b00b9ff2bab8a64d3281 /src/core/hle/service/filesystem
parentfilesystem: Create subdirectories prior to creating a file (diff)
downloadyuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar.gz
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar.bz2
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar.lz
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar.xz
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar.zst
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.zip
Diffstat (limited to 'src/core/hle/service/filesystem')
-rw-r--r--src/core/hle/service/filesystem/filesystem.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp
index 3020101a1..c66124998 100644
--- a/src/core/hle/service/filesystem/filesystem.cpp
+++ b/src/core/hle/service/filesystem/filesystem.cpp
@@ -55,6 +55,7 @@ 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));
+ // dir can be nullptr if path contains subdirectories, create those prior to creating the file.
if (dir == nullptr) {
dir = backing->CreateSubdirectory(FileUtil::GetParentPath(path));
}