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);