Minor fileman bug fixes (#977)

-sets max file count to 100, fixes partner rename and delete in subfolders.
This commit is contained in:
Kyle Reed 2023-05-11 22:54:42 -07:00 committed by GitHub
parent a832bd433d
commit a86993af91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -444,7 +444,7 @@ void FileManagerView::on_rename() {
[this, renamed_path](const fs::path& partner, bool should_rename) mutable {
if (should_rename) {
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();
}
@ -466,7 +466,7 @@ void FileManagerView::on_delete() {
nav_, get_selected_full_path(), "Delete",
[this](const fs::path& partner, bool should_delete) {
if (should_delete)
delete_file(current_path / partner);
delete_file(partner);
reload_current();
}
);

View File

@ -62,7 +62,7 @@ public:
protected:
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 {
std::filesystem::path extension;