mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
bug 71393, miscalculates free space on large drives. Contributed by thorgal@amiga.com.pl and bzbarsky@mit.edu, r=ksosez@softhome.net/dveditz@netscape.com
This commit is contained in:
parent
0c9834b8c7
commit
184c59ebaf
@ -529,7 +529,10 @@ PRInt64 nsFileSpec::GetDiskSpaceAvailable() const
|
||||
fs_buf.f_bsize * (fs_buf.f_bavail - 1));
|
||||
#endif
|
||||
|
||||
LL_I2L( bytes, (fs_buf.f_bsize * (fs_buf.f_bavail - 1) ) );
|
||||
PRInt64 bsize,bavail;
|
||||
LL_I2L( bsize, fs_buf.f_bsize );
|
||||
LL_I2L( bavail, fs_buf.f_bavail - 1 );
|
||||
LL_MUL( *aDiskSpaceAvailable, bsize, bavail );
|
||||
return bytes;
|
||||
|
||||
#else
|
||||
|
@ -1005,7 +1005,10 @@ nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable)
|
||||
// a non-superuser, minus one as a fudge factor, multiplied by the size
|
||||
// of the beforementioned blocks.
|
||||
|
||||
LL_I2L(*aDiskSpaceAvailable, fs_buf.f_bsize * (fs_buf.f_bavail - 1));
|
||||
PRInt64 bsize,bavail;
|
||||
LL_I2L( bsize, fs_buf.f_bsize );
|
||||
LL_I2L( bavail, fs_buf.f_bavail - 1 );
|
||||
LL_MUL( *aDiskSpaceAvailable, bsize, bavail );
|
||||
return NS_OK;
|
||||
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user