aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/vfs_real.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2020-12-11 20:23:40 -0500
committerMorph <39850852+Morph1984@users.noreply.github.com>2020-12-11 20:24:22 -0500
commit9e47a3f7cd386ad67d7f5c2afa77e41a8e93cae9 (patch)
tree5396ad80ba6d9455c95590f2fa666b3253a761d3 /src/core/file_sys/vfs_real.cpp
parent4b2d4ac4127eb2d6b0820b0fe0de09b983259e71 (diff)
Revert "Merge pull request #5176 from Morph1984/fix-createfile"
This reverts commit 586d5a72e1e151b9767b93be2c4b8b636acdf00f, reversing changes made to 1f5f5d8d3cd5b399260a8bb8f30dda5ac30aab3d.
Diffstat (limited to 'src/core/file_sys/vfs_real.cpp')
-rw-r--r--src/core/file_sys/vfs_real.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/file_sys/vfs_real.cpp b/src/core/file_sys/vfs_real.cpp
index 3b70f7755b..488687ba90 100644
--- a/src/core/file_sys/vfs_real.cpp
+++ b/src/core/file_sys/vfs_real.cpp
@@ -94,13 +94,9 @@ VirtualFile RealVfsFilesystem::OpenFile(std::string_view path_, Mode perms) {
VirtualFile RealVfsFilesystem::CreateFile(std::string_view path_, Mode perms) {
const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault);
- const auto parent_path = FS::GetParentPath(path);
-
+ const auto path_fwd = FS::SanitizePath(path, FS::DirectorySeparator::ForwardSlash);
if (!FS::Exists(path)) {
- if (!FS::CreateDirs(parent_path)) {
- return nullptr;
- }
-
+ FS::CreateFullPath(path_fwd);
if (!FS::CreateEmptyFile(path)) {
return nullptr;
}