aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-06-11 16:24:17 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-10-14 11:28:18 -0400
commit9b78f3ce8ed1867c37f6b9fff98f74582d44b789 (patch)
treeb3a6cd467709b5e03dbbc743e0bf3c52298d0455 /src
parentac38a87225be0f1103ff9629d63980550d2f372b (diff)
downloadbitcoin-9b78f3ce8ed1867c37f6b9fff98f74582d44b789.tar.xz
walletutil: Wallets can also be sqlite
Diffstat (limited to 'src')
-rw-r--r--src/wallet/walletutil.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp
index 23cdb8f64c..a2a55f9751 100644
--- a/src/wallet/walletutil.cpp
+++ b/src/wallet/walletutil.cpp
@@ -8,6 +8,7 @@
#include <util/system.h>
bool ExistsBerkeleyDatabase(const fs::path& path);
+bool ExistsSQLiteDatabase(const fs::path& path);
fs::path GetWalletDir()
{
@@ -48,7 +49,8 @@ std::vector<fs::path> ListWalletDir()
// 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);
- if (it->status().type() == fs::directory_file && ExistsBerkeleyDatabase(it->path())) {
+ if (it->status().type() == fs::directory_file &&
+ (ExistsBerkeleyDatabase(it->path()) || ExistsSQLiteDatabase(it->path()))) {
// Found a directory which contains wallet.dat btree file, add it as a wallet.
paths.emplace_back(path);
} else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && ExistsBerkeleyDatabase(it->path())) {