From 5c23d3343dd6e1886da2d0e9703bd7621d2619cf Mon Sep 17 00:00:00 2001 From: Ruoshi Lin Date: Mon, 28 Jun 2021 15:41:35 +0800 Subject: [PATCH] Fix SQLite file not found issue (#2371) When OP customize bukkit/spigot plugins directory location, SQLite file will still on default directory. It will cause directory not found exception. Also let SQLite file not correct in the plugin directory. Co-authored-by: Yuehu Lin --- src/main/java/fr/xephi/authme/datasource/SQLite.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite.java b/src/main/java/fr/xephi/authme/datasource/SQLite.java index da1851bd..24b8b946 100644 --- a/src/main/java/fr/xephi/authme/datasource/SQLite.java +++ b/src/main/java/fr/xephi/authme/datasource/SQLite.java @@ -88,7 +88,7 @@ public class SQLite extends AbstractSqlDataSource { } logger.debug("SQLite driver loaded"); - this.con = DriverManager.getConnection("jdbc:sqlite:plugins/AuthMe/" + database + ".db"); + this.con = DriverManager.getConnection("jdbc:sqlite:" + this.dataFolder + File.separator + database + ".db"); this.columnsHandler = AuthMeColumnsHandler.createForSqlite(con, settings); }