Merge pull request #182 from rascafr/file-manager-hide-tmp-dot-files

Hide temporary & OS system in Frequency Manager
This commit is contained in:
Erwin Ried 2020-09-11 15:02:16 +02:00 committed by GitHub
commit c4052064a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -43,8 +43,10 @@ void FileManBaseView::load_directory_contents(const std::filesystem::path& dir_p
entry_list.push_back({ u"..", 0, true });
for (const auto& entry : std::filesystem::directory_iterator(dir_path, u"*")) {
// do not display dir / files starting with '.' (hidden / tmp)
if (entry.path().string().length() && entry.path().filename().string()[0] != '.') {
if (std::filesystem::is_regular_file(entry.status())) {
if (entry.path().string().length()) {
bool matched = true;
if (filtering) {
auto entry_extension = entry.path().extension().string();
@ -58,12 +60,12 @@ void FileManBaseView::load_directory_contents(const std::filesystem::path& dir_p
if (matched)
entry_list.push_back({ entry.path(), (uint32_t)entry.size(), false });
}
} else if (std::filesystem::is_directory(entry.status())) {
entry_list.insert(entry_list.begin(), { entry.path(), 0, true });
}
}
}
}
std::filesystem::path FileManBaseView::get_selected_path() {
auto selected_path_str = current_path.string();

View File

@ -23,7 +23,7 @@ import sys
import struct
from PIL import Image
outfile = open('../../sdcard/world_map.bin', 'wb')
outfile = open('../../sdcard/ADSB/world_map.bin', 'wb')
# Allow for bigger images
Image.MAX_IMAGE_PIXELS = None