aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/DatabaseController.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/DatabaseController.kt')
-rw-r--r--src/main/kotlin/DatabaseController.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/DatabaseController.kt b/src/main/kotlin/DatabaseController.kt
index 74ddf70..783b387 100644
--- a/src/main/kotlin/DatabaseController.kt
+++ b/src/main/kotlin/DatabaseController.kt
@@ -228,9 +228,9 @@ class DatabaseController(dbFileLocation: String = "main.db") {
fun deleteFile(fileLocation: String, userId: Int) {
transaction {
try {
- FileLocation.deleteWhere { FileLocation.location eq fileLocation and FileLocation. }
+ FileLocation.deleteWhere { (FileLocation.location eq fileLocation) and (FileLocation.userId eq userId) }
} catch (_: org.jetbrains.exposed.exceptions.ExposedSQLException) {
-
+ log.warning("File does not exist!")
}
}
}