dont automatically create dbpath

This commit is contained in:
Mathias Stearn
2011-01-12 16:57:56 -05:00
parent 87716d4152
commit e0bdcb4f2b

View File

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