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 <dev@fntsr.tw>
This commit is contained in:
Ruoshi Lin 2021-06-28 15:41:35 +08:00 committed by GitHub
parent ec1fba2d50
commit 5c23d3343d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}