Преглед изворни кода

Revert "Merge pull request #5176 from Morph1984/fix-createfile"

This reverts commit 6d6115475b4edccdf1bb4e96ecc3d3b1be319e76, reversing
changes made to 5fe55b16a11d9ec607fb8a3fdddc77a4393cd96a.
Morph пре 5 година
родитељ
комит
dfee6321cd
1 измењених фајлова са 2 додато и 6 уклоњено
  1. 2 6
      src/core/file_sys/vfs_real.cpp

+ 2 - 6
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;
         }