0
0
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:
Aaron 2009-01-12 09:58:30 -05:00
parent 9e3d798e37
commit 3e5965e2c9

View File

@ -1053,7 +1053,7 @@ boost::intmax_t dbSize( const char *database ) {
boost::intmax_t freeSpace() {
struct statvfs info;
assert( !statvfs( dbpath, &info ) );
return info.f_bavail * info.f_frsize;
return boost::intmax_t( info.f_bavail ) * info.f_frsize;
}
#endif