diff --git a/rai/core_test/block_store.cpp b/rai/core_test/block_store.cpp index a41ed011af..928bf28269 100644 --- a/rai/core_test/block_store.cpp +++ b/rai/core_test/block_store.cpp @@ -410,16 +410,16 @@ TEST (block_store, bad_path) ASSERT_TRUE (init); } -TEST (block_store, already_open) +TEST (block_store, DISABLED_already_open) // File can be shared { auto path (rai::unique_path ()); - boost::filesystem::create_directories (path); + boost::filesystem::create_directories (path.parent_path ()); std::ofstream file; - file.open ((path / "accounts.ldb").string ().c_str ()); + file.open (path.string ().c_str ()); ASSERT_TRUE (file.is_open ()); bool init (false); rai::block_store store (init, path); - ASSERT_FALSE (init); + ASSERT_TRUE (init); } TEST (block_store, delete_iterator_entry) diff --git a/rai/node.cpp b/rai/node.cpp index 2cd5bbb255..a7bd50ff4e 100644 --- a/rai/node.cpp +++ b/rai/node.cpp @@ -1379,7 +1379,7 @@ class send_visitor : public rai::block_visitor rai::node::node (rai::node_init & init_a, boost::shared_ptr service_a, uint16_t port_a, boost::filesystem::path const & application_path_a, rai::processor_service & processor_a, rai::logging const & logging_a) : service (processor_a), -store (init_a.block_store_init, application_path_a / "data"), +store (init_a.block_store_init, application_path_a / "data.ldb"), gap_cache (*this), ledger (store), conflicts (*this), diff --git a/rai/utility.cpp b/rai/utility.cpp index cb8fc740c1..84d577edae 100644 --- a/rai/utility.cpp +++ b/rai/utility.cpp @@ -59,7 +59,7 @@ rai::uint128_t rai::scale_up (uint64_t amount_a) rai::mdb_env::mdb_env (bool & error_a, boost::filesystem::path const & path_a) { boost::system::error_code error; - boost::filesystem::create_directories (path_a, error); + boost::filesystem::create_directories (path_a.parent_path (), error); if (!error) { auto status1 (mdb_env_create (&environment)); @@ -68,7 +68,7 @@ rai::mdb_env::mdb_env (bool & error_a, boost::filesystem::path const & path_a) assert (status2 == 0); auto status3 (mdb_env_set_mapsize (environment, 1024 * 1024 * 1024)); assert (status3 == 0); - auto status4 (mdb_env_open (environment, path_a.string ().c_str (), 0, 00600)); + auto status4 (mdb_env_open (environment, path_a.string ().c_str (), MDB_NOSUBDIR, 00600)); error_a = status4 != 0; } else