hot fix of the hot fix (again)

This commit is contained in:
georgemoralis 2024-09-26 18:24:05 +03:00
parent 0b7126e3be
commit 23f4b304b8

View File

@ -13,11 +13,11 @@ namespace toml {
template <typename TC, typename K>
std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
std::filesystem::path opt) {
if (opt.empty()) {
return opt;
}
try {
auto str = find<std::string>(v, ky);
if (str.empty()) {
return opt;
}
std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};
return std::filesystem::path{u8str};
} catch (...) {