Skip to content

Commit 14c237d

Browse files
author
suushie_maniac
committed
Made file paths OS independent
1 parent a34d1ed commit 14c237d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/com/puzzletimer/Main.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public Main() {
5757
File databaseFile = new File("puzzletimerWCA.mv.db");
5858
if (!databaseFile.exists()) {
5959
try {
60-
Connection connection = DriverManager.getConnection("jdbc:h2:./puzzletimerWCA");
60+
Connection connection = DriverManager.getConnection("jdbc:h2:." + File.separator + "puzzletimerWCA");
6161
Reader script = new InputStreamReader(
6262
getClass().getResourceAsStream("/com/puzzletimer/resources/database/puzzletimerWCA.sql"));
6363
RunScript.execute(connection, script);
@@ -77,7 +77,7 @@ public Main() {
7777
// connect to database
7878
Connection connection = null;
7979
try {
80-
connection = DriverManager.getConnection("jdbc:h2:./puzzletimerWCA;IFEXISTS=TRUE");
80+
connection = DriverManager.getConnection("jdbc:h2:." + File.separator + "puzzletimerWCA;IFEXISTS=TRUE");
8181
} catch (SQLException e) {
8282
e.printStackTrace();
8383
JFrame frame = new JFrame();

0 commit comments

Comments
 (0)