Selaa lähdekoodia

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.
Andreas Kling 5 vuotta sitten
vanhempi
commit
566eb58170
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  1. 1 2
      Libraries/LibGUI/GDirectoryModel.cpp

+ 1 - 2
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();