X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/b9db26703f52ba5d1ff05e911480155765bf9192..ac73af7bedeebe2afa451249e8a6500651a6ec00:/src/infosidebarpage.cpp diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index bed20b1f5..7b0d2d40c 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -333,9 +333,10 @@ void InfoSidebarPage::showMetaInfo() unsigned long int totalSize = 0; foreach (const KFileItem& item, selectedItems) { - // TODO: what to do with directories (same with the one-item-selected-code)?, - // item.size() does not return the size of the content : not very instinctive for users - totalSize += item.size(); + // Only count the size of files, not dirs; to match what + // DolphinViewContainer::selectionStatusBarText does. + if (!item.isDir() && !item.isLink()) + totalSize += item.size(); } addInfoLine(text, i18nc("@label", "Total size:"), KIO::convertSize(totalSize)); }