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:
parent
bfce7eea5c
commit
e82aedd451
1 changed files with 3 additions and 3 deletions
|
@ -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())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue