summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/utils.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-04-16 20:56:52 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-04-16 20:56:52 +0000
commite82aedd45127ef7aec06d98196c89c691aedc9c8 (patch)
treec7cf016e57d3bc3ad7ceec5d8d64ea8cbd7ea6d7 /rbutil/rbutilqt/base/utils.cpp
parentbfce7eea5c0d43c9f2cd84cd325bbcc1949102e3 (diff)
Fix overflow on free space calculation (Linux / OS X).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20717 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/utils.cpp')
-rw-r--r--rbutil/rbutilqt/base/utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp
index 2e6b04ecff..4b76c6497a 100644
--- a/rbutil/rbutilqt/base/utils.cpp
+++ b/rbutil/rbutilqt/base/utils.cpp
@@ -117,7 +117,7 @@ qulonglong filesystemFree(QString path)
ret = statvfs(qPrintable(path), &fs);
if(ret == 0)
- size = fs.f_bsize * fs.f_bavail;
+ size = (qulonglong)fs.f_bsize * (qulonglong)fs.f_bavail;
#endif
#if defined(Q_OS_WIN32)
BOOL ret;
@@ -140,10 +140,10 @@ bool RockboxInfo::open()
QFile file(m_path);
if(!file.exists())
return false;
-
+
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
return false;
-
+
// read file contents
while (!file.atEnd())
{