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.
This commit is contained in:
Andreas Kling 2019-09-12 18:41:09 +02:00
parent 1632f6b2dd
commit 566eb58170
Notes: sideshowbarker 2024-07-19 12:09:05 +09:00

View file

@ -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();