mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 05:00:27 +02:00
Use safe UTF-8 path construction
This commit is contained in:
1 parent
7ebda6bf7f
commit
4897e7e27d
2 files changed
+2
-2
No files matched your search
@@ -777,7 +777,7 @@ inline std::string DvdRoot(std::string fallback = "") {
|
||||
inline std::filesystem::path ResolveRelativeTo(const std::filesystem::path& base,
|
||||
const std::string& value) {
|
||||
// Config strings are UTF-8; the char overload would decode via the ANSI codepage.
|
||||
std::filesystem::path path(reinterpret_cast<const char8_t*>(value.c_str()));
|
||||
std::filesystem::path path(std::u8string(value.begin(), value.end()));
|
||||
if (path.is_relative()) {
|
||||
path = base / path;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user