Skip to content

Commit

Permalink
use parent folder
Browse files Browse the repository at this point in the history
  • Loading branch information
smk762 committed Aug 19, 2024
1 parent 3eda9f2 commit 179b578
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/atomicdex/services/kdf/kdf.service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2228,13 +2228,13 @@ namespace atomic_dex
.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))
auto dbdir_parent = std::filesystem::path(utils::get_atomic_dex_data_folder() / "kdf");
auto old_dbdir_parent = std::filesystem::path(utils::get_atomic_dex_data_folder() / "mm2");
if (not std::filesystem::exists(dbdir_parent))
{
if (std::filesystem::exists(old_dbdir))
if (std::filesystem::exists(old_dbdir_parent))
{
std::filesystem::rename(old_dbdir, dbdir);
std::filesystem::rename(old_dbdir_parent, dbdir_parent);
}
}

Expand Down

0 comments on commit 179b578

Please sign in to comment.