aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorunknown <prayank23@outlook.com>2021-05-13 21:03:02 +0530
committerunknown <prayank23@outlook.com>2021-06-01 20:34:20 +0530
commitd44a261acff40c1c8727d3cc0106bde65a6416d0 (patch)
tree7c8f723f43688240a15d5ab1c330112407a32084 /src/wallet
parent0ab6ff5e375900906fdf6a2834fedcc76d0e031c (diff)
Fix issues when `walletdir` is root directory
+ Remove one character less from wallet path if root directory
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/db.cpp2
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;