From 0b7126e3be990971577897d8596f9ef912328276 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 26 Sep 2024 18:13:57 +0300 Subject: [PATCH] hot-fix: check if path is empty --- src/common/config.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/config.cpp b/src/common/config.cpp index 4fb2818e..28164605 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -13,6 +13,9 @@ 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); std::u8string u8str{(char8_t*)&str.front(), (char8_t*)&str.back() + 1};