diff options
Diffstat (limited to 'src/main/kotlin/DatabaseController.kt')
-rw-r--r-- | src/main/kotlin/DatabaseController.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/DatabaseController.kt b/src/main/kotlin/DatabaseController.kt index 6ec13e4..dbb41ba 100644 --- a/src/main/kotlin/DatabaseController.kt +++ b/src/main/kotlin/DatabaseController.kt @@ -261,13 +261,13 @@ class DatabaseController(dbFileLocation: String = "main.db") { /** * Returns accessId of file in directory */ - fun getAccessIdOfDirectory(fileName: String, accessId: String): String { + fun getAccessIdOfDirectory(filename: String, accessId: String): String { return transaction { try { val fileData = FileLocation.select { FileLocation.accessId eq accessId }.map { it[FileLocation.path] to it[FileLocation.userId] to it[FileLocation.isShared] }[0] if (fileData.second) - FileLocation.select { (FileLocation.path eq "${fileData.first.first}${fileName.substring(1)}") and (FileLocation.userId eq fileData.first.second) }.map { it[FileLocation.accessId] }[0] + FileLocation.select { (FileLocation.path eq "${fileData.first.first}${filename.substring(1)}") and (FileLocation.userId eq fileData.first.second) }.map { it[FileLocation.accessId] }[0] else "" } catch (_: Exception) { "" |