mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-27 04:47:51 +02:00
more fixes
This commit is contained in:
@ -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();
|
||||
|
@ -67,7 +67,7 @@ int main() {
|
||||
icons::load();
|
||||
|
||||
spdlog::info("Loading band plans");
|
||||
bandplan::loadFromDir("../bandplans");
|
||||
bandplan::loadFromDir("bandplans");
|
||||
|
||||
spdlog::info("Ready.");
|
||||
|
||||
|
Reference in New Issue
Block a user