path: root/rbutil/rbutilqt/base/zipinstaller.cpp
diff options
authorDominik Riebeling <>2011-07-26 20:54:44 +0000
committerDominik Riebeling <>2011-07-26 20:54:44 +0000
commit743308e8828d36ce53fbf25a6fd815dad74b7d59 (patch)
tree4b3431410c2bdafc3e66541dee9e7733bc59e7b9 /rbutil/rbutilqt/base/zipinstaller.cpp
parent3bb0fed345d72c7bf944ab490a249463ed150586 (diff)
Take cluster size into account when calculating zip extracted size.
Allow passing an (optional) cluster size to round up all file sizes when calculating the total size of an extracted zip archive. This allows to check if the space on disk is actually sufficient without relying on an arbitrary headroom value which might be wrong. Addresses FS#12195. git-svn-id: svn:// a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/zipinstaller.cpp')
1 files changed, 2 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/zipinstaller.cpp b/rbutil/rbutilqt/base/zipinstaller.cpp
index 76f673ff81..c450f3015f 100644
--- a/rbutil/rbutilqt/base/zipinstaller.cpp
+++ b/rbutil/rbutilqt/base/zipinstaller.cpp
@@ -140,7 +140,8 @@ void ZipInstaller::downloadDone(bool error)
// some room for operating (also includes calculation mistakes due to
// cluster sizes on the player).
- < (zip.totalUncompressedSize() + 1000000)) {
+ < (zip.totalUncompressedSize(Utils::filesystemClusterSize(m_mountpoint))
+ + 1000000)) {
emit logItem(tr("Not enough disk space! Aborting."), LOGERROR);
emit logProgress(1, 1);
emit done(true);