Merge pull request #184 from rascafr/rascafr/freq-manager-hide-tmp-dot-files

Hide temporary & OS system files from category files list
This commit is contained in:
Erwin Ried 2020-09-11 22:18:20 +02:00 committed by GitHub
commit 4390647e28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,11 @@ std::vector<std::string> get_freqman_files() {
auto files = scan_root_files(u"FREQMAN", u"*.TXT"); auto files = scan_root_files(u"FREQMAN", u"*.TXT");
for (auto file : 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; return file_list;