refactor db directory
This commit is contained in:
parent
d9740445dc
commit
f1ab604fe9
@ -40,7 +40,7 @@ create_rocksdb(const repertory::app_config &cfg, const std::string &name,
|
|||||||
auto db_dir =
|
auto db_dir =
|
||||||
repertory::utils::path::combine(cfg.get_data_directory(), {"db"});
|
repertory::utils::path::combine(cfg.get_data_directory(), {"db"});
|
||||||
if (not repertory::utils::file::directory{db_dir}.create_directory()) {
|
if (not repertory::utils::file::directory{db_dir}.create_directory()) {
|
||||||
throw startup_exception(
|
throw repertory::startup_exception(
|
||||||
fmt::format("failed to create db directory|", db_dir));
|
fmt::format("failed to create db directory|", db_dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ create_rocksdb(const repertory::app_config &cfg, const std::string &name,
|
|||||||
auto db_dir =
|
auto db_dir =
|
||||||
repertory::utils::path::combine(cfg.get_data_directory(), {"db"});
|
repertory::utils::path::combine(cfg.get_data_directory(), {"db"});
|
||||||
if (not repertory::utils::file::directory{db_dir}.create_directory()) {
|
if (not repertory::utils::file::directory{db_dir}.create_directory()) {
|
||||||
throw startup_exception(
|
throw repertory::startup_exception(
|
||||||
fmt::format("failed to create db directory|", db_dir));
|
fmt::format("failed to create db directory|", db_dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ create_rocksdb(const repertory::app_config &cfg, const std::string &name,
|
|||||||
auto db_dir =
|
auto db_dir =
|
||||||
repertory::utils::path::combine(cfg.get_data_directory(), {"db"});
|
repertory::utils::path::combine(cfg.get_data_directory(), {"db"});
|
||||||
if (not repertory::utils::file::directory{db_dir}.create_directory()) {
|
if (not repertory::utils::file::directory{db_dir}.create_directory()) {
|
||||||
throw startup_exception(
|
throw repertory::startup_exception(
|
||||||
fmt::format("failed to create db directory|", db_dir));
|
fmt::format("failed to create db directory|", db_dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user