Skip to content

Commit d52f502

Browse files
committed
Fix mock SQLiteDatabases
1 parent 99309ab commit d52f502

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wallet/sqlite.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ void SQLiteDatabase::Open()
206206
}
207207

208208
if (m_db == nullptr) {
209-
TryCreateDirectories(m_dir_path);
209+
if (!m_mock) {
210+
TryCreateDirectories(m_dir_path);
211+
}
210212
int ret = sqlite3_open_v2(m_file_path.c_str(), &m_db, flags, nullptr);
211213
if (ret != SQLITE_OK) {
212214
throw std::runtime_error(strprintf("SQLiteDatabase: Failed to open database: %s\n", sqlite3_errstr(ret)));

0 commit comments

Comments
 (0)