Fix shard path detection

This commit is contained in:
Miguel Portilla
2019-07-30 13:59:39 -04:00
committed by Nik Bougalis
parent a02d914093
commit 9e117b7b38

View File

@@ -65,12 +65,11 @@ Shard::open(Section config, Scheduler& scheduler, nudb::context& ctx)
return false; return false;
} }
auto const preexist {exists(dir_)};
config.set("path", dir_.string()); config.set("path", dir_.string());
backend_ = factory->createInstance( backend_ = factory->createInstance(
NodeObject::keyBytes, config, scheduler, ctx, j_); NodeObject::keyBytes, config, scheduler, ctx, j_);
auto const preexist {exists(dir_)};
auto fail = [&](std::string msg) auto fail = [&](std::string msg)
{ {
if (!msg.empty()) if (!msg.empty())