Skip to content

Commit d44a261

Browse files
author
unknown
committed
Fix issues when walletdir is root directory
+ Remove one character less from wallet path if root directory
1 parent 0ab6ff5 commit d44a261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wallet/db.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
std::vector<fs::path> ListDatabases(const fs::path& wallet_dir)
1414
{
15-
const size_t offset = wallet_dir.string().size() + 1;
15+
const size_t offset = wallet_dir.string().size() + (wallet_dir == wallet_dir.root_name() ? 0 : 1);
1616
std::vector<fs::path> paths;
1717
boost::system::error_code ec;
1818

0 commit comments

Comments
 (0)