mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Minor fileman bug fixes (#977)
-sets max file count to 100, fixes partner rename and delete in subfolders.
This commit is contained in:
parent
a832bd433d
commit
a86993af91
@ -444,7 +444,7 @@ void FileManagerView::on_rename() {
|
|||||||
[this, renamed_path](const fs::path& partner, bool should_rename) mutable {
|
[this, renamed_path](const fs::path& partner, bool should_rename) mutable {
|
||||||
if (should_rename) {
|
if (should_rename) {
|
||||||
auto new_name = renamed_path.replace_extension(partner.extension());
|
auto new_name = renamed_path.replace_extension(partner.extension());
|
||||||
rename_file(current_path / partner, current_path / new_name);
|
rename_file(partner, current_path / new_name);
|
||||||
}
|
}
|
||||||
reload_current();
|
reload_current();
|
||||||
}
|
}
|
||||||
@ -466,7 +466,7 @@ void FileManagerView::on_delete() {
|
|||||||
nav_, get_selected_full_path(), "Delete",
|
nav_, get_selected_full_path(), "Delete",
|
||||||
[this](const fs::path& partner, bool should_delete) {
|
[this](const fs::path& partner, bool should_delete) {
|
||||||
if (should_delete)
|
if (should_delete)
|
||||||
delete_file(current_path / partner);
|
delete_file(partner);
|
||||||
reload_current();
|
reload_current();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
static constexpr size_t max_filename_length = 64;
|
static constexpr size_t max_filename_length = 64;
|
||||||
static constexpr size_t max_items_shown = 128;
|
static constexpr size_t max_items_shown = 100;
|
||||||
|
|
||||||
struct file_assoc_t {
|
struct file_assoc_t {
|
||||||
std::filesystem::path extension;
|
std::filesystem::path extension;
|
||||||
|
Loading…
Reference in New Issue
Block a user