aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/ledger/database/Database.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-10-27 21:18:57 +0100
committerLinnea Gräf <nea@nea.moe>2024-10-27 21:18:57 +0100
commit5c7f1f4e9677ed5794604b2835098e64294e5357 (patch)
treeabdd709dd89c67a12057b4aafd99f9a7dcea1b5f /src/main/kotlin/moe/nea/ledger/database/Database.kt
parent977620f1b5218cc8a041742f970974a4bfff29cc (diff)
downloadLocalTransactionLedger-5c7f1f4e9677ed5794604b2835098e64294e5357.tar.gz
LocalTransactionLedger-5c7f1f4e9677ed5794604b2835098e64294e5357.tar.bz2
LocalTransactionLedger-5c7f1f4e9677ed5794604b2835098e64294e5357.zip
Fix money-ledger folder not being created for db
Fixes https://github.com/nea89o/LocalTransactionLedger/issues/1
Diffstat (limited to 'src/main/kotlin/moe/nea/ledger/database/Database.kt')
-rw-r--r--src/main/kotlin/moe/nea/ledger/database/Database.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/ledger/database/Database.kt b/src/main/kotlin/moe/nea/ledger/database/Database.kt
index 633b3a0..9dc4e00 100644
--- a/src/main/kotlin/moe/nea/ledger/database/Database.kt
+++ b/src/main/kotlin/moe/nea/ledger/database/Database.kt
@@ -1,9 +1,10 @@
package moe.nea.ledger.database
+import moe.nea.ledger.Ledger
import java.sql.DriverManager
object Database {
- val connection = DriverManager.getConnection("jdbc:sqlite:money-ledger/database.db")
+ val connection = DriverManager.getConnection("jdbc:sqlite:${Ledger.dataFolder.resolve("database.db")}")
object MetaTable : Table("LedgerMeta") {
val key = column("key", DBString)