diff options
| author | 2020-12-11 20:07:37 -0800 | |
|---|---|---|
| committer | 2020-12-11 20:07:37 -0800 | |
| commit | c918c6480f9426518df5e741db34620aec350c48 (patch) | |
| tree | 248c4a7d84ea6f1c1a7781a8490261165745ac0d /src/core/file_sys | |
| parent | Merge pull request #5172 from lioncash/svc-wide (diff) | |
| parent | Revert "Merge pull request #5173 from lioncash/common-fs" (diff) | |
| download | yuzu-c918c6480f9426518df5e741db34620aec350c48.tar.gz yuzu-c918c6480f9426518df5e741db34620aec350c48.tar.xz yuzu-c918c6480f9426518df5e741db34620aec350c48.zip | |
Merge pull request #5187 from Morph1984/revert-stdfs
fs: Revert all std::filesystem changes
Diffstat (limited to 'src/core/file_sys')
| -rw-r--r-- | src/core/file_sys/vfs_real.cpp | 8 |
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 | ||
| 95 | VirtualFile RealVfsFilesystem::CreateFile(std::string_view path_, Mode perms) { | 95 | VirtualFile 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 | } |