mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-31 02:29:38 -04:00
Merge pull request #182 from rascafr/file-manager-hide-tmp-dot-files
Hide temporary & OS system in Frequency Manager
This commit is contained in:
commit
c4052064a9
2 changed files with 8 additions and 6 deletions
|
@ -43,8 +43,10 @@ void FileManBaseView::load_directory_contents(const std::filesystem::path& dir_p
|
||||||
entry_list.push_back({ u"..", 0, true });
|
entry_list.push_back({ u"..", 0, true });
|
||||||
|
|
||||||
for (const auto& entry : std::filesystem::directory_iterator(dir_path, u"*")) {
|
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 (std::filesystem::is_regular_file(entry.status())) {
|
||||||
if (entry.path().string().length()) {
|
|
||||||
bool matched = true;
|
bool matched = true;
|
||||||
if (filtering) {
|
if (filtering) {
|
||||||
auto entry_extension = entry.path().extension().string();
|
auto entry_extension = entry.path().extension().string();
|
||||||
|
@ -58,12 +60,12 @@ void FileManBaseView::load_directory_contents(const std::filesystem::path& dir_p
|
||||||
|
|
||||||
if (matched)
|
if (matched)
|
||||||
entry_list.push_back({ entry.path(), (uint32_t)entry.size(), false });
|
entry_list.push_back({ entry.path(), (uint32_t)entry.size(), false });
|
||||||
}
|
|
||||||
} else if (std::filesystem::is_directory(entry.status())) {
|
} else if (std::filesystem::is_directory(entry.status())) {
|
||||||
entry_list.insert(entry_list.begin(), { entry.path(), 0, true });
|
entry_list.insert(entry_list.begin(), { entry.path(), 0, true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::filesystem::path FileManBaseView::get_selected_path() {
|
std::filesystem::path FileManBaseView::get_selected_path() {
|
||||||
auto selected_path_str = current_path.string();
|
auto selected_path_str = current_path.string();
|
||||||
|
|
|
@ -23,7 +23,7 @@ import sys
|
||||||
import struct
|
import struct
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
outfile = open('../../sdcard/world_map.bin', 'wb')
|
outfile = open('../../sdcard/ADSB/world_map.bin', 'wb')
|
||||||
|
|
||||||
# Allow for bigger images
|
# Allow for bigger images
|
||||||
Image.MAX_IMAGE_PIXELS = None
|
Image.MAX_IMAGE_PIXELS = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue