diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-10-26 15:10:16 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-11-18 11:56:12 -0500 |
commit | d52f502b1ea1cafa7d58c5517f01dba26ecb7269 (patch) | |
tree | c1dc01b07c4eb5a2e7b425c8155cdadb06031abf /src/wallet | |
parent | 99309ab3e96a290359b84f9b657c5115aa3470dd (diff) |
Fix mock SQLiteDatabases
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/sqlite.cpp | 4 |
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))); |