Support file count on sub-folders (#1423)

This commit is contained in:
Kyle Reed 2023-08-30 09:05:35 -07:00 committed by GitHub
parent c28b608146
commit 4bc752b7a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,7 +249,10 @@ void FileManBaseView::refresh_list() {
auto entry_name = truncate(entry.path, 20);
if (entry.is_directory) {
auto size_str = (entry.path == parent_dir_path) ? "" : to_string_dec_uint(file_count(entry.path));
auto size_str =
(entry.path == parent_dir_path)
? ""
: to_string_dec_uint(file_count(current_path / entry.path));
menu_view.add_item(
{entry_name + std::string(21 - entry_name.length(), ' ') + size_str,