Revert recent file system changes (#11370)

* Revert "FS: use std::filesystem::u8path"

This reverts commit cd016be86e.

* Revert "VFS: fix missing path deliminators"

This reverts commit 84753db574.

* Revert "Bugfix of Emulator::Load disc path searching"

This reverts commit b9179de288.

* Revert "fs: Reimplement path resolving using std::filesystem::weakly_canonical"

This reverts commit 0c4b2ff06b.
This commit is contained in:
MSuih 2022-01-13 06:24:04 +02:00 committed by GitHub
parent 949e93bec7
commit f526027778
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 45 deletions

View file

@ -4,7 +4,6 @@
#include "Crypto/sha1.h"
#include <unordered_map>
#include <filesystem>
#include <algorithm>
#include <cstring>
#include <map>
@ -1823,20 +1822,6 @@ bool fs::remove_all(const std::string& path, bool remove_root)
return true;
}
std::string fs::resolve_path(std::string_view path)
{
std::error_code ec{};
const auto result = std::filesystem::weakly_canonical(std::filesystem::u8path(path), ec);
if (ec)
{
g_tls_error = error::inval;
return {};
}
return result.string();
}
u64 fs::get_dir_size(const std::string& path, u64 rounding_alignment)
{
u64 result = 0;