1
0
Fork 0
forked from len0rd/rockbox

Fix overflow on free space calculation (Linux / OS X).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20717 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2009-04-16 20:56:52 +00:00
parent bfce7eea5c
commit e82aedd451

View file

@ -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())
{