From ccb3937e37216e6622fb87960bde485ec3fd31fb Mon Sep 17 00:00:00 2001 From: Rascafr Date: Fri, 11 Sep 2020 20:34:15 +0200 Subject: [PATCH 1/2] Hide .dot tmp / system files from list in frequency manager module --- firmware/application/freqman.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firmware/application/freqman.cpp b/firmware/application/freqman.cpp index 93ad444b..7c0ace6d 100644 --- a/firmware/application/freqman.cpp +++ b/firmware/application/freqman.cpp @@ -30,6 +30,11 @@ std::vector get_freqman_files() { for (auto file : files) { file_list.emplace_back(file.stem().string()); + std::string file_name = file.stem().string(); + // don't propose tmp / hidden files in freqman's list + if (file_name.length() && file_name[0] != '.') { + file_list.emplace_back(file_name); + } } return file_list; From fcdbedca9819e52e80dc8e8d367cbf5cb2e09086 Mon Sep 17 00:00:00 2001 From: Rascafr Date: Fri, 11 Sep 2020 20:46:41 +0200 Subject: [PATCH 2/2] Bad emplace_back code position fix --- firmware/application/freqman.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/firmware/application/freqman.cpp b/firmware/application/freqman.cpp index 7c0ace6d..c172d158 100644 --- a/firmware/application/freqman.cpp +++ b/firmware/application/freqman.cpp @@ -29,7 +29,6 @@ std::vector get_freqman_files() { auto files = scan_root_files(u"FREQMAN", u"*.TXT"); for (auto file : files) { - file_list.emplace_back(file.stem().string()); std::string file_name = file.stem().string(); // don't propose tmp / hidden files in freqman's list if (file_name.length() && file_name[0] != '.') {