diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-07-15 13:08:04 -0400 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-07-16 00:15:27 -0400 |
commit | 5892fc1555d45a7e6382a07252d232019dd5978d (patch) | |
tree | 39ea0b1e974c2b476403b00b9ff2bab8a64d3281 | |
parent | 2079bb4090b97b87faf69b3a32f8c115de61002e (diff) |
Add comment to clarify the nullptr check
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 1 |
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)); } |