Fix issue #302 - incorrect freespace on 32 bits system

--HG--
branch : fix_freespace_check
hg/compatibility-develop
Guillaume Dupuy 8 years ago
parent c435f77201
commit 9172d14dd3

@ -1390,7 +1390,7 @@ uint64 CSystemInfo::availableHDSpace (const string &filename)
struct statfs stfs; struct statfs stfs;
if (::statfs(path.c_str(), &stfs) != 0) return 0; if (::statfs(path.c_str(), &stfs) != 0) return 0;
return (uint64)(stfs.f_bavail * stfs.f_bsize); return (uint64)stfs.f_bavail * (uint64)stfs.f_bsize;
#else #else
ULARGE_INTEGER freeSpace = {0}; ULARGE_INTEGER freeSpace = {0};
BOOL bRes = ::GetDiskFreeSpaceExW(utf8ToWide(path), &freeSpace, NULL, NULL); BOOL bRes = ::GetDiskFreeSpaceExW(utf8ToWide(path), &freeSpace, NULL, NULL);

Loading…
Cancel
Save