diff --git a/src/common/config.cpp b/src/common/config.cpp index 28164605..f130c74a 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -13,11 +13,11 @@ namespace toml { template std::filesystem::path find_fs_path_or(const basic_value& v, const K& ky, std::filesystem::path opt) { - if (opt.empty()) { - return opt; - } try { auto str = find(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 (...) {