https://twitter.com/2btc10000pizzas/status/1303768424133398528
No idea what could be going on here :/
https://twitter.com/2btc10000pizzas/status/1303768424133398528
No idea what could be going on here :/
I can confirm and reproduce the bug @2btc10000pizzas and @RawMaterialNYC reported; if we have no wallets dir in conf and datadir is configed by the users with trailing '/' that would strip leading char from walletnames.
The first char will be striped with in rpc listwallletdir call and in qt gui.
A possible fix if we have boost > 1.60 might be PR https://github.com/bitcoin/bitcoin/commit/2682e7b186b55a987952778e7635d475a63034ed
diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp
index e4c72aed9..78a7a82d8 100644
--- a/src/wallet/walletutil.cpp
+++ b/src/wallet/walletutil.cpp
@@ -57,7 +57,6 @@ bool IsBerkeleyBtree(const fs::path& path)
std::vector<fs::path> ListWalletDir()
{
const fs::path wallet_dir = GetWalletDir();
- const size_t offset = wallet_dir.string().size() + 1;
std::vector<fs::path> paths;
boost::system::error_code ec;
@@ -68,8 +67,8 @@ std::vector<fs::path> ListWalletDir()
}
// Get wallet path relative to walletdir by removing walletdir from the wallet path.
- // This can be replaced by boost::filesystem::lexically_relative once boost is bumped to 1.60.
- const fs::path path = it->path().string().substr(offset);
+
+ const fs::path path = fs::relative(it->path(), wallet_dir);
if (it->status().type() == fs::directory_file && IsBerkeleyBtree(it->path() / "wallet.dat")) {
// Found a directory which contains wallet.dat btree file, add it as a wallet.