Skip to content

Commit

Permalink
Update HSQLMetadataStorage.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
acharneski committed Nov 15, 2024
1 parent bf58ea7 commit 45dfc05
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class HSQLMetadataStorage(private val dbFile: File) : MetadataStorageInterface {
private val log = LoggerFactory.getLogger(javaClass)

private val connection: Connection by lazy {
require(dbFile.absoluteFile.mkdirs()) { "Unable to create database directory: ${dbFile.absolutePath}" }
require(dbFile.absoluteFile.exists() || dbFile.absoluteFile.mkdirs()) { "Unable to create database directory: ${dbFile.absolutePath}" }
log.info("Initializing HSQLMetadataStorage with database file: ${dbFile.absolutePath}")
Class.forName("org.hsqldb.jdbc.JDBCDriver")
val connection = DriverManager.getConnection("jdbc:hsqldb:file:${dbFile.absolutePath}/metadata;shutdown=true", "SA", "")
Expand Down

0 comments on commit 45dfc05

Please sign in to comment.