summaryrefslogtreecommitdiff
path: root/db/pdfile.h
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-01-26 14:40:06 -0800
committerAaron <aaron@10gen.com>2010-01-26 14:40:06 -0800
commitd0847c99123bc5d2362a90ec11316724256b85e2 (patch)
treea582f7309433692f19a2f397b8198134a6367fb7 /db/pdfile.h
parenta13d0b88c23e553a278244490613a13292027979 (diff)
downloadmongo-d0847c99123bc5d2362a90ec11316724256b85e2.tar.gz
SERVER-308 add support for --directoryperdb option
Diffstat (limited to 'db/pdfile.h')
-rw-r--r--db/pdfile.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/db/pdfile.h b/db/pdfile.h
index aee3a2a6dc2..c36ca92951a 100644
--- a/db/pdfile.h
+++ b/db/pdfile.h
@@ -392,6 +392,10 @@ namespace mongo {
void _applyOpToDataFiles( const char *database, FileOp &fo, bool afterAllocator = false, const string& path = dbpath );
inline void _deleteDataFiles(const char *database) {
+ if ( directoryperdb ) {
+ BOOST_CHECK_EXCEPTION( boost::filesystem::remove_all( boost::filesystem::path( dbpath ) / database ) );
+ return;
+ }
class : public FileOp {
virtual bool apply( const boost::filesystem::path &p ) {
return boost::filesystem::remove( p );