From abc9ceb29eac4a3a8615ca1f89f2ef251a938464 Mon Sep 17 00:00:00 2001 From: dankito Date: Fri, 20 Sep 2024 05:49:42 +0200 Subject: [PATCH] Fixed determining if folder is writable --- .../banking/persistence/BankingRepository.jvm.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/BankingPersistence/src/jvmMain/kotlin/net/codinux/banking/persistence/BankingRepository.jvm.kt b/BankingPersistence/src/jvmMain/kotlin/net/codinux/banking/persistence/BankingRepository.jvm.kt index 14f5458..66e79d7 100644 --- a/BankingPersistence/src/jvmMain/kotlin/net/codinux/banking/persistence/BankingRepository.jvm.kt +++ b/BankingPersistence/src/jvmMain/kotlin/net/codinux/banking/persistence/BankingRepository.jvm.kt @@ -6,6 +6,9 @@ import app.cash.sqldelight.db.SqlDriver import app.cash.sqldelight.db.SqlSchema import app.cash.sqldelight.driver.jdbc.sqlite.JdbcSqliteDriver import java.io.File +import java.nio.file.Files +import kotlin.io.path.Path +import kotlin.io.path.absolutePathString val dataDirectory: File = determineDataDirectory() @@ -27,10 +30,11 @@ actual fun createSqlDriverDriver(dbName: String, schema: SqlSchema