From 3013a608350ae0a93d4a7e7c31e9eb6646c69e1c Mon Sep 17 00:00:00 2001 From: Nicholas Bransby-Williams Date: Tue, 17 Oct 2023 12:13:12 +0100 Subject: [PATCH] Update NativeDatabase.kt --- .../kotlin/com/ctrip/sqllin/driver/cinterop/NativeDatabase.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqllin-driver/src/nativeMain/kotlin/com/ctrip/sqllin/driver/cinterop/NativeDatabase.kt b/sqllin-driver/src/nativeMain/kotlin/com/ctrip/sqllin/driver/cinterop/NativeDatabase.kt index e6e7990..9f18baa 100644 --- a/sqllin-driver/src/nativeMain/kotlin/com/ctrip/sqllin/driver/cinterop/NativeDatabase.kt +++ b/sqllin-driver/src/nativeMain/kotlin/com/ctrip/sqllin/driver/cinterop/NativeDatabase.kt @@ -50,7 +50,7 @@ internal class NativeDatabase private constructor(val dbPointer: CPointer>() if(configuration.isReadOnly) { - //from SQLITE_OPEN_READWRITE docs: if opening in read-write mode fails due to OS-level permissions, an attempt is made to open it in read-only mode + //from sqlite3_open_v2 docs: if opening in read-write mode fails due to OS-level permissions, an attempt is made to open it in read-only mode val openResult = sqlite3_open_v2(realPath, dbPtr.ptr, SQLITE_OPEN_READWRITE or SQLITE_OPEN_URI, null) if (openResult == SQLITE_OK) return@memScoped dbPtr.value!! }