mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-19 18:04:56 +00:00
hot-fix: check if path is empty
This commit is contained in:
parent
675fd4b31a
commit
0b7126e3be
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,9 @@ 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);
|
||||||
std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};
|
std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue