mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-14 08:12:16 +00:00
hot fix of the hot fix (again)
This commit is contained in:
parent
0b7126e3be
commit
23f4b304b8
1 changed files with 3 additions and 3 deletions
|
@ -13,11 +13,11 @@ namespace toml {
|
||||||
template <typename TC, typename K>
|
template <typename TC, typename K>
|
||||||
std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
|
std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
|
||||||
std::filesystem::path opt) {
|
std::filesystem::path opt) {
|
||||||
if (opt.empty()) {
|
|
||||||
return opt;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
auto str = find<std::string>(v, ky);
|
auto str = find<std::string>(v, ky);
|
||||||
|
if (str.empty()) {
|
||||||
|
return opt;
|
||||||
|
}
|
||||||
std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};
|
std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};
|
||||||
return std::filesystem::path{u8str};
|
return std::filesystem::path{u8str};
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue