summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-01-12 09:58:30 -0500
committerAaron <aaron@10gen.com>2009-01-12 09:58:30 -0500
commit3e5965e2c988e7da3d29205adf169891cca2433c (patch)
treefec5e89ec02c6ceb8bb18303516a7005009aba11 /db
parent9e3d798e37da1138036a410e70163f8ed9d7bdb5 (diff)
downloadmongo-3e5965e2c988e7da3d29205adf169891cca2433c.tar.gz
Fix disk free space calculation
Diffstat (limited to 'db')
-rw-r--r--db/pdfile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/pdfile.cpp b/db/pdfile.cpp
index f7e60ea8268..6190c2d0cc2 100644
--- a/db/pdfile.cpp
+++ b/db/pdfile.cpp
@@ -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