Skip to content

Commit 9f998d9

Browse files
committed
better support for windows
1 parent 017894c commit 9f998d9

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/dev/noah/perplayerkit/storage/StorageSelector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public StorageSelector(Plugin plugin, String storageType) {
3939
case "yml":
4040
case "yaml":
4141
storageManager = new YAMLStorage(plugin,
42-
plugin.getDataFolder() + File.separator + "please-use-a-real-database.yml");
42+
new File(plugin.getDataFolder(), "please-use-a-real-database.yml").getAbsolutePath());
4343
break;
4444
case "redis":
4545
storageManager = new RedisStorage(plugin);

src/main/java/dev/noah/perplayerkit/storage/sql/SQLite.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class SQLite implements SQLDatabase {
3434

3535
public SQLite(Plugin plugin) {
3636
this.plugin = plugin;
37-
this.databasePath = plugin.getDataFolder() + File.separator + "database.db";
37+
this.databasePath = plugin.getDataFolder().getAbsolutePath().replace('\\', '/') + "/database.db";
3838
}
3939

4040
public boolean isConnected() {
@@ -55,7 +55,6 @@ public void connect() throws ClassNotFoundException, SQLException {
5555
"&cache_size=10000" + // 10MB cache (negative = KB, positive = pages)
5656
"&temp_store=MEMORY" + // Use memory for temp tables
5757
"&mmap_size=268435456" + // 256MB memory-mapped I/O
58-
"&optimize" + // Run PRAGMA optimize on connection
5958
"&foreign_keys=ON" + // Enable foreign key constraints
6059
"&busy_timeout=30000"); // 30 second busy timeout
6160

0 commit comments

Comments
 (0)