Merge pull request #5187 from Morph1984/revert-stdfs

fs: Revert all std::filesystem changes
This commit is contained in:
bunnei 2020-12-11 20:07:37 -08:00 committed by GitHub
commit c918c6480f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 396 additions and 142 deletions

View file

@ -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;
}