Skip to content

Commit

Permalink
rename kdf DB path to retain prior history
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Aug 19, 2024
1 parent 92b39a5 commit 1b146a4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/core/atomicdex/services/kdf/kdf.service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2227,6 +2227,17 @@ namespace atomic_dex
.passphrase = std::move(passphrase),
.rpc_password = std::move(rpcpass) == "" ? std::move(atomic_dex::gen_random_password()) : std::move(rpcpass)
};

auto dbdir = std::filesystem::path(cfg.dbdir);
auto old_dbdir = std::filesystem::path(utils::get_atomic_dex_data_folder() / "mm2" / "DB");
if (not std::filesystem::exists(dbdir))
{
if (std::filesystem::exists(old_dbdir))
{
std::filesystem::rename(old_dbdir, dbdir);
}
}

kdf::set_system_manager(m_system_manager);
kdf::set_rpc_password(cfg.rpc_password);
json json_cfg;
Expand Down

0 comments on commit 1b146a4

Please sign in to comment.