mirror of
https://github.com/openflocon/Flocon.git
synced 2026-04-28 10:19:33 +00:00
refact: move db to .flocon folder (#447)
Some checks failed
docs / deploy (push) Has been cancelled
Some checks failed
docs / deploy (push) Has been cancelled
Co-authored-by: Florent Champigny <florent@bere.al>
This commit is contained in:
parent
a5d4bbcd81
commit
5ad3e64a31
1 changed files with 3 additions and 1 deletions
|
|
@ -5,7 +5,9 @@ import androidx.room.RoomDatabase
|
|||
import java.io.File
|
||||
|
||||
actual fun getDatabaseBuilder(): RoomDatabase.Builder<AppDatabase> {
|
||||
val dbFile = File(System.getProperty("java.io.tmpdir"), "flocon_room.db")
|
||||
val folder = File(System.getProperty("user.home"), ".flocon")
|
||||
folder.mkdirs()
|
||||
val dbFile = File(folder, "flocon_room.db")
|
||||
// UNCOMMENT TO TEST ON AN EMPTY DB
|
||||
// dbFile.delete()
|
||||
return Room.databaseBuilder<AppDatabase>(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue