mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-29 04:48:49 +02:00
Fix issues when walletdir
is root directory
+ Remove one character less from wallet path if root directory
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
std::vector<fs::path> ListDatabases(const fs::path& wallet_dir)
|
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;
|
std::vector<fs::path> paths;
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user