Skip to content

Commit

Permalink
Fix mock SQLiteDatabases
Browse files Browse the repository at this point in the history
Github-Pull: bitcoin#20202
Rebased-From: d52f502
  • Loading branch information
achow101 authored and luke-jr committed Feb 26, 2021
1 parent c8694ff commit e0e1484
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wallet/sqlite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down

0 comments on commit e0e1484

Please sign in to comment.