summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Morph2020-12-11 20:23:40 -0500
committerGravatar Morph2020-12-11 20:24:22 -0500
commitdfee6321cd313ae72019d9717de95e8b3f9a4728 (patch)
tree5396ad80ba6d9455c95590f2fa666b3253a761d3 /src
parentRevert "Merge pull request #5179 from ReinUsesLisp/fs-path" (diff)
downloadyuzu-dfee6321cd313ae72019d9717de95e8b3f9a4728.tar.gz
yuzu-dfee6321cd313ae72019d9717de95e8b3f9a4728.tar.xz
yuzu-dfee6321cd313ae72019d9717de95e8b3f9a4728.zip
Revert "Merge pull request #5176 from Morph1984/fix-createfile"
This reverts commit 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76, reversing changes made to 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a.
Diffstat (limited to 'src')
-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 3b70f7755..488687ba9 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) {
94 94
95VirtualFile RealVfsFilesystem::CreateFile(std::string_view path_, Mode perms) { 95VirtualFile RealVfsFilesystem::CreateFile(std::string_view path_, Mode perms) {
96 const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault); 96 const auto path = FS::SanitizePath(path_, FS::DirectorySeparator::PlatformDefault);
97 const auto parent_path = FS::GetParentPath(path); 97 const auto path_fwd = FS::SanitizePath(path, FS::DirectorySeparator::ForwardSlash);
98
99 if (!FS::Exists(path)) { 98 if (!FS::Exists(path)) {
100 if (!FS::CreateDirs(parent_path)) { 99 FS::CreateFullPath(path_fwd);
101 return nullptr;
102 }
103
104 if (!FS::CreateEmptyFile(path)) { 100 if (!FS::CreateEmptyFile(path)) {
105 return nullptr; 101 return nullptr;
106 } 102 }