Skip to content

Commit 4242e9a

Browse files
lint
1 parent f8bf9c9 commit 4242e9a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

core/src/androidMain/kotlin/com/powersync/DatabaseDriverFactory.android.kt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public actual class DatabaseDriverFactory(
1616
internal actual fun createDriver(
1717
scope: CoroutineScope,
1818
dbFilename: String,
19-
dbDirectory: String?
19+
dbDirectory: String?,
2020
): PsSqlDriver {
2121
val schema = InternalSchema
2222

@@ -27,13 +27,16 @@ public actual class DatabaseDriverFactory(
2727
properties.setProperty("busy_timeout", "30000")
2828
properties.setProperty("cache_size", "${50 * 1024}")
2929

30-
val dbPath = if (dbDirectory != null) "$dbDirectory/$dbFilename"
31-
// TODO verify compatibility with previous implementation
32-
else context.getDatabasePath(dbFilename)
30+
val dbPath =
31+
if (dbDirectory != null) {
32+
"$dbDirectory/$dbFilename"
33+
} else {
34+
// TODO verify compatibility with previous implementation
35+
context.getDatabasePath(dbFilename)
36+
}
3337

3438
val driver =
3539
JdbcSqliteDriver(
36-
3740
url = "jdbc:sqlite:$dbPath",
3841
properties = properties,
3942
)

0 commit comments

Comments
 (0)