diff options
author | unknown <prayank23@outlook.com> | 2021-05-13 21:03:02 +0530 |
---|---|---|
committer | unknown <prayank23@outlook.com> | 2021-06-01 20:34:20 +0530 |
commit | d44a261acff40c1c8727d3cc0106bde65a6416d0 (patch) | |
tree | 7c8f723f43688240a15d5ab1c330112407a32084 /src | |
parent | 0ab6ff5e375900906fdf6a2834fedcc76d0e031c (diff) |
Fix issues when `walletdir` is root directory
+ Remove one character less from wallet path if root directory
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/db.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index cd49baeb78..993dd09b8b 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -12,7 +12,7 @@ std::vector<fs::path> ListDatabases(const fs::path& wallet_dir) { - const size_t offset = wallet_dir.string().size() + 1; + const size_t offset = wallet_dir.string().size() + (wallet_dir == wallet_dir.root_name() ? 0 : 1); std::vector<fs::path> paths; boost::system::error_code ec; |