mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-23 18:42:26 +02:00
Fix mock SQLiteDatabases
This commit is contained in:
@@ -206,7 +206,9 @@ void SQLiteDatabase::Open()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (m_db == nullptr) {
|
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);
|
int ret = sqlite3_open_v2(m_file_path.c_str(), &m_db, flags, nullptr);
|
||||||
if (ret != SQLITE_OK) {
|
if (ret != SQLITE_OK) {
|
||||||
throw std::runtime_error(strprintf("SQLiteDatabase: Failed to open database: %s\n", sqlite3_errstr(ret)));
|
throw std::runtime_error(strprintf("SQLiteDatabase: Failed to open database: %s\n", sqlite3_errstr(ret)));
|
||||||
|
Reference in New Issue
Block a user