mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Fix disk free space calculation
This commit is contained in:
parent
9e3d798e37
commit
3e5965e2c9
@ -1053,7 +1053,7 @@ boost::intmax_t dbSize( const char *database ) {
|
|||||||
boost::intmax_t freeSpace() {
|
boost::intmax_t freeSpace() {
|
||||||
struct statvfs info;
|
struct statvfs info;
|
||||||
assert( !statvfs( dbpath, &info ) );
|
assert( !statvfs( dbpath, &info ) );
|
||||||
return info.f_bavail * info.f_frsize;
|
return boost::intmax_t( info.f_bavail ) * info.f_frsize;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user