Skip to content

Commit

Permalink
proj.db opening: allow opening with a URI (typically for memvfs) (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Sep 8, 2023
1 parent 140b991 commit 2297392
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/iso19111/factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ std::shared_ptr<SQLiteHandle> SQLiteHandle::open(PJ_CONTEXT *ctx,
}
sqlite3 *sqlite_handle = nullptr;
// SQLITE_OPEN_FULLMUTEX as this will be used from concurrent threads
if (sqlite3_open_v2(path.c_str(), &sqlite_handle,
SQLITE_OPEN_READONLY | SQLITE_OPEN_FULLMUTEX,
vfsName.empty() ? nullptr : vfsName.c_str()) !=
SQLITE_OK ||
if (sqlite3_open_v2(
path.c_str(), &sqlite_handle,
SQLITE_OPEN_READONLY | SQLITE_OPEN_FULLMUTEX | SQLITE_OPEN_URI,
vfsName.empty() ? nullptr : vfsName.c_str()) != SQLITE_OK ||
!sqlite_handle) {
if (sqlite_handle != nullptr) {
sqlite3_close(sqlite_handle);
Expand Down

0 comments on commit 2297392

Please sign in to comment.