From e0bdcb4f2b96e35e0fe4e5b830791b2c20259c4c Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Wed, 12 Jan 2011 16:57:56 -0500 Subject: [PATCH] dont automatically create dbpath --- util/file_allocator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/file_allocator.cpp b/util/file_allocator.cpp index 4465ac1339c..0764936e2f1 100644 --- a/util/file_allocator.cpp +++ b/util/file_allocator.cpp @@ -35,10 +35,12 @@ using namespace mongoutils; namespace mongo { + extern string dbpath; void ensureParentDirCreated(const boost::filesystem::path& p){ const boost::filesystem::path parent = p.parent_path(); if (! boost::filesystem::exists(parent)){ + massert(13624, "dbpath doesn't exist", parent != dbpath); ensureParentDirCreated(parent); log() << "creating directory " << parent.string() << endl; boost::filesystem::create_directory(parent);