aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-10-26 15:10:16 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-11-18 11:56:12 -0500
commitd52f502b1ea1cafa7d58c5517f01dba26ecb7269 (patch)
treec1dc01b07c4eb5a2e7b425c8155cdadb06031abf /src/wallet
parent99309ab3e96a290359b84f9b657c5115aa3470dd (diff)
Fix mock SQLiteDatabases
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/sqlite.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/sqlite.cpp b/src/wallet/sqlite.cpp
index d83332c194..d278d96476 100644
--- a/src/wallet/sqlite.cpp
+++ b/src/wallet/sqlite.cpp
@@ -206,7 +206,9 @@ void SQLiteDatabase::Open()
}
if (m_db == nullptr) {
- TryCreateDirectories(m_dir_path);
+ if (!m_mock) {
+ TryCreateDirectories(m_dir_path);
+ }
int ret = sqlite3_open_v2(m_file_path.c_str(), &m_db, flags, nullptr);
if (ret != SQLITE_OK) {
throw std::runtime_error(strprintf("SQLiteDatabase: Failed to open database: %s\n", sqlite3_errstr(ret)));