Skip to content

Commit 9b78f3c

Browse files
committed
walletutil: Wallets can also be sqlite
1 parent ac38a87 commit 9b78f3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wallet/walletutil.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <util/system.h>
99

1010
bool ExistsBerkeleyDatabase(const fs::path& path);
11+
bool ExistsSQLiteDatabase(const fs::path& path);
1112

1213
fs::path GetWalletDir()
1314
{
@@ -48,7 +49,8 @@ std::vector<fs::path> ListWalletDir()
4849
// This can be replaced by boost::filesystem::lexically_relative once boost is bumped to 1.60.
4950
const fs::path path = it->path().string().substr(offset);
5051

51-
if (it->status().type() == fs::directory_file && ExistsBerkeleyDatabase(it->path())) {
52+
if (it->status().type() == fs::directory_file &&
53+
(ExistsBerkeleyDatabase(it->path()) || ExistsSQLiteDatabase(it->path()))) {
5254
// Found a directory which contains wallet.dat btree file, add it as a wallet.
5355
paths.emplace_back(path);
5456
} else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && ExistsBerkeleyDatabase(it->path())) {

0 commit comments

Comments
 (0)