From 566eb58170503f977939e8722a1bf626972bd097 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 12 Sep 2019 18:41:09 +0200 Subject: [PATCH] GDirectoryModel: Include directories in total byte count I don't know what's really right or wrong here. It seems fine to also include the directories in the total byte count, and it makes it a bit easier to stay consistent when adding up size numbers elsewhere. --- Libraries/LibGUI/GDirectoryModel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/LibGUI/GDirectoryModel.cpp b/Libraries/LibGUI/GDirectoryModel.cpp index 51cdf04266..5104199886 100644 --- a/Libraries/LibGUI/GDirectoryModel.cpp +++ b/Libraries/LibGUI/GDirectoryModel.cpp @@ -317,8 +317,7 @@ void GDirectoryModel::update() auto& entries = S_ISDIR(st.st_mode) ? m_directories : m_files; entries.append(move(entry)); - if (S_ISREG(entry.mode)) - m_bytes_in_files += st.st_size; + m_bytes_in_files += st.st_size; } did_update();