summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Morph2020-07-15 13:08:04 -0400
committerGravatar Morph2020-07-16 00:15:27 -0400
commit5892fc1555d45a7e6382a07252d232019dd5978d (patch)
tree39ea0b1e974c2b476403b00b9ff2bab8a64d3281
parentfilesystem: Create subdirectories prior to creating a file (diff)
downloadyuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar.gz
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.tar.xz
yuzu-5892fc1555d45a7e6382a07252d232019dd5978d.zip
Add comment to clarify the nullptr check
Diffstat (limited to '')
-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 {
55ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64 size) const { 55ResultCode VfsDirectoryServiceWrapper::CreateFile(const std::string& path_, u64 size) const {
56 std::string path(FileUtil::SanitizePath(path_)); 56 std::string path(FileUtil::SanitizePath(path_));
57 auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path)); 57 auto dir = GetDirectoryRelativeWrapped(backing, FileUtil::GetParentPath(path));
58 // dir can be nullptr if path contains subdirectories, create those prior to creating the file.
58 if (dir == nullptr) { 59 if (dir == nullptr) {
59 dir = backing->CreateSubdirectory(FileUtil::GetParentPath(path)); 60 dir = backing->CreateSubdirectory(FileUtil::GetParentPath(path));
60 } 61 }