Leandro Borges Ferreira
09/20/2024, 12:20 PM./gradlew runDistributable
it works just fine. But when I run ./gradlew packageDmg
and I run the generated app... I get the error: opening db: 'database.db_1' Read-only file system
.
Did anyone else ever faced this problem?Olivier Patry
09/20/2024, 12:26 PMSystem.getProperty("user.home")
then creating a dedicated directory for my app, like .myApp/
in which I store the database file.Leandro Borges Ferreira
09/20/2024, 12:35 PMval database: Database = DatabaseFactory.createDatabase(
DriverFactory(),
url = "jdbc:sqlite:database.db_1",
)
[...]
public fun createDatabase(
driverFactory: DriverFactory,
url: String = "jdbc:sqlite:"
): Database {
val driver = driverFactory.createDriver(url)
return Database.invoke(driver)
}
I think I probably need to change the database.db_1
to a place with more permissions, like you said a directory dedicated for the appLeandro Borges Ferreira
09/20/2024, 12:35 PMOlivier Patry
09/20/2024, 12:43 PMJdbcSqliteDriver("jdbc:sqlite:${databaseFile.absolutePath}")
Leandro Borges Ferreira
09/20/2024, 12:49 PM