more fixes

This commit is contained in:
Ryzerth
2020-08-05 12:50:34 +02:00
parent 08292c279e
commit e24e3cbc2a
58 changed files with 19 additions and 3755 deletions

View File

@ -66,6 +66,14 @@ namespace bandplan {
}
void loadFromDir(std::string path) {
if (!std::filesystem::exists(path)) {
spdlog::error("Band Plan directory does not exist");
return;
}
if (!std::filesystem::is_directory(path)) {
spdlog::error("Band Plan directory isn't a directory...");
return;
}
bandplans.clear();
for (const auto & file : std::filesystem::directory_iterator(path)) {
std::string path = file.path().generic_string();

View File

@ -67,7 +67,7 @@ int main() {
icons::load();
spdlog::info("Loading band plans");
bandplan::loadFromDir("../bandplans");
bandplan::loadFromDir("bandplans");
spdlog::info("Ready.");