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
0diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp
1index e4c72aed9..78a7a82d8 100644
2--- a/src/wallet/walletutil.cpp
3+++ b/src/wallet/walletutil.cpp
4@@ -57,7 +57,6 @@ bool IsBerkeleyBtree(const fs::path& path)
5 std::vector<fs::path> ListWalletDir()
6 {
7 const fs::path wallet_dir = GetWalletDir();
8- const size_t offset = wallet_dir.string().size() + 1;
9 std::vector<fs::path> paths;
10 boost::system::error_code ec;
11
12@@ -68,8 +67,8 @@ std::vector<fs::path> ListWalletDir()
13 }
14
15 // Get wallet path relative to walletdir by removing walletdir from the wallet path.
16- // This can be replaced by boost::filesystem::lexically_relative once boost is bumped to 1.60.
17- const fs::path path = it->path().string().substr(offset);
18+
19+ const fs::path path = fs::relative(it->path(), wallet_dir);
20
21 if (it->status().type() == fs::directory_file && IsBerkeleyBtree(it->path() / "wallet.dat")) {
22 // Found a directory which contains wallet.dat btree file, add it as a wallet.