From d44a261acff40c1c8727d3cc0106bde65a6416d0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 May 2021 21:03:02 +0530 Subject: [PATCH] Fix issues when `walletdir` is root directory + Remove one character less from wallet path if root directory --- src/wallet/db.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index cd49baeb786..993dd09b8b9 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -12,7 +12,7 @@ std::vector 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 paths; boost::system::error_code ec;