summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-12 18:41:09 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-12 18:41:28 +0200
commit566eb58170503f977939e8722a1bf626972bd097 (patch)
treeabb19128bfb7c31b5181e362321ee1e2495bed9f
parent1632f6b2dd7383b810b08bf723465565b2ef9701 (diff)
downloadserenity-566eb58170503f977939e8722a1bf626972bd097.zip
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.
-rw-r--r--Libraries/LibGUI/GDirectoryModel.cpp3
1 files changed, 1 insertions, 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();