From 0aa8fc673f2a1a9341cf59e5f0038b54c2253713 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 3 Oct 2016 17:17:57 +0200 Subject: [PATCH] Fixed: Wrong size for downloaded components --- .../ryzom_installer/src/uninstalldialog.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/code/ryzom/tools/client/ryzom_installer/src/uninstalldialog.cpp b/code/ryzom/tools/client/ryzom_installer/src/uninstalldialog.cpp index bfba57840..1330a16bf 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/uninstalldialog.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/uninstalldialog.cpp @@ -265,7 +265,24 @@ void CUninstallDialog::updateSizes() } // downloaded files - qint64 bytes = getDirectorySize(config->getInstallationDirectory(), false); + qint64 bytes = 0; + + QDir dir(config->getInstallationDirectory()); + + QStringList filters; + + filters << "*.log"; + filters << "*.7z"; + filters << "*.bnp"; + filters << "*.zip"; + filters << "*.part"; + + QFileInfoList downloadedFiles = dir.entryInfoList(filters, QDir::Files); + + foreach(const QFileInfo &info, downloadedFiles) + { + bytes += info.size(); + } emit updateSize(m_downloadedFilesIndex, qBytesToHumanReadable(bytes));