Fix discrepancy in total size between statusbar and infosidebarpage; reported by _mika, approved by Peter.

svn path=/trunk/KDE/kdebase/apps/; revision=750121
This commit is contained in:
David Faure 2007-12-18 18:13:31 +00:00
parent fe09a37c59
commit 00bded7c8d

View file

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