From 4bc752b7a829409c98bb3df739b184c1eb8ea64c Mon Sep 17 00:00:00 2001 From: Kyle Reed <3761006+kallanreed@users.noreply.github.com> Date: Wed, 30 Aug 2023 09:05:35 -0700 Subject: [PATCH] Support file count on sub-folders (#1423) --- firmware/application/apps/ui_fileman.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/application/apps/ui_fileman.cpp b/firmware/application/apps/ui_fileman.cpp index fb3405e5..fb4cd886 100644 --- a/firmware/application/apps/ui_fileman.cpp +++ b/firmware/application/apps/ui_fileman.cpp @@ -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,