mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
Fix mock SQLiteDatabases
This commit is contained in:
parent
99309ab3e9
commit
d52f502b1e
1 changed files with 3 additions and 1 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Reference in a new issue