Fixed weird bug where config files spointainously appear everywhere (wtf...)

This commit is contained in:
AlexandreRouma
2021-12-26 02:09:37 +01:00
parent 66269659c5
commit 470e748e4a
4 changed files with 14 additions and 5 deletions

View File

@@ -305,6 +305,8 @@ int sdrpp_main(int argc, char* argv[]) {
json bandColors = core::configManager.conf["bandColors"];
core::configManager.release();
// Assert that the resource directory is absolute and check existance
resDir = std::filesystem::absolute(resDir).string();
if (!std::filesystem::is_directory(resDir)) {
spdlog::error("Resource directory doesn't exist! Please make sure that you've configured it correctly in config.json (check readme for details)");
return 1;