mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-11 19:02:16 +01:00
Fixes an SQLException related to the fix for #309 (WAL mode argument was regarded as filename)
This commit is contained in:
parent
0ca5be7e89
commit
5771218857
@ -59,7 +59,14 @@ public class SQLiteDB extends SQLDB {
|
||||
}
|
||||
|
||||
String dbFilePath = new File(plugin.getDataFolder(), dbName + ".db").getAbsolutePath();
|
||||
Connection connection = DriverManager.getConnection("jdbc:sqlite:" + dbFilePath + "?journal_mode=WAL");
|
||||
Connection connection;
|
||||
|
||||
try {
|
||||
connection = DriverManager.getConnection("jdbc:sqlite:" + dbFilePath + "?journal_mode=WAL");
|
||||
} catch (SQLException ignored) {
|
||||
connection = DriverManager.getConnection("jdbc:sqlite:" + dbFilePath);
|
||||
Log.info("SQLite WAL mode not supported on this server version, using default. This may or may not affect performance.");
|
||||
}
|
||||
connection.setAutoCommit(false);
|
||||
// connection.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user