Skip to content

Commit 9356d00

Browse files
committed
Enable URI filenames in SQLite
Enable usage of URI filenames in SQLite calls. In theory, this should not break any current use case as we tend to pass full paths to SQLite and they should never start with "file:" or similar. This should make it possible to attach databases using full URI specifiers. See issue #2493.
1 parent 2742dcf commit 9356d00

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/sqlitedb.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ DBBrowserDB::DBBrowserDB() :
104104
Callback<void(void*, int, const char*)>::func = std::bind(&DBBrowserDB::errorLogCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3);
105105
void (*log_callback)(void*, int, const char*) = static_cast<decltype(log_callback)>(Callback<void(void*, int, const char*)>::callback);
106106
sqlite3_config(SQLITE_CONFIG_LOG, log_callback, nullptr);
107+
108+
// Enable URI filenames
109+
sqlite3_config(SQLITE_CONFIG_URI, 1);
107110
}
108111

109112
void DBBrowserDB::collationNeeded(void* /*pData*/, sqlite3* /*db*/, int eTextRep, const char* sCollationName)

0 commit comments

Comments
 (0)