diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-01-05 17:07:47 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-01-05 17:58:21 -0500 |
commit | 432a8396eef6888c740c5a6ad8be3eed3fba34b5 (patch) | |
tree | 371a10cc9a70cac2f6383c67607d9b6eb0af1d67 /src/mongo/db/durop.cpp | |
parent | 717c7a2d79272f03f73f3214fbb61b59e22836ee (diff) | |
download | mongo-432a8396eef6888c740c5a6ad8be3eed3fba34b5.tar.gz |
remove boost filesystem includes from pch.h and be explicit anywhere we use it
Diffstat (limited to 'src/mongo/db/durop.cpp')
-rw-r--r-- | src/mongo/db/durop.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/durop.cpp b/src/mongo/db/durop.cpp index 80ee5043410..39a8e3dc907 100644 --- a/src/mongo/db/durop.cpp +++ b/src/mongo/db/durop.cpp @@ -27,6 +27,8 @@ using namespace mongoutils; +#include <boost/filesystem/operations.hpp> + namespace mongo { extern string dbpath; // --dbpath parm @@ -109,7 +111,7 @@ namespace mongo { // if an operation deletes or creates a file (or moves etc.), it may need files closed. bool FileCreatedOp::needFilesClosed() { - return exists( _p.asFullPath() ); + return boost::filesystem::exists( _p.asFullPath() ); } void FileCreatedOp::replay() { @@ -117,9 +119,9 @@ namespace mongo { // or rewrite at least, even if it were the right length. perhaps one day we should change that // although easier to avoid defects if we assume it is zeros perhaps. string full = _p.asFullPath(); - if( exists(full) ) { + if( boost::filesystem::exists(full) ) { try { - remove(full); + boost::filesystem::remove(full); } catch(std::exception& e) { log(1) << "recover info FileCreateOp::replay unlink " << e.what() << endl; @@ -127,10 +129,10 @@ namespace mongo { } log() << "recover create file " << full << ' ' << _len/1024.0/1024.0 << "MB" << endl; - if( MemoryMappedFile::exists(full) ) { + if( boost::filesystem::exists(full) ) { // first delete if exists. try { - remove(full); + boost::filesystem::remove(full); } catch(...) { log() << "warning could not delete file " << full << endl; |