From 36f15173e203806b79098feba290f286293b91fb Mon Sep 17 00:00:00 2001 From: "Trejkaz (pen name)" Date: Mon, 24 Apr 2017 21:23:42 +1000 Subject: [PATCH] Removing hard-coded backslashes Hard-coded backslashes caused creation of file called "config\armory\Addons\weaponry.cfg" in the root directory instead of putting the file in config/armory/Addons, when running on any OS other than Windows. Forward slashes work fine for all platforms in Java and thus is the obvious fix. I have not checked other files in the repository for the same bug. --- .../armory/weaponry/common/config/WeaponryConfigs.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/com/smithsmodding/armory/weaponry/common/config/WeaponryConfigs.java b/src/main/com/smithsmodding/armory/weaponry/common/config/WeaponryConfigs.java index 179b05a..ddd8c0e 100644 --- a/src/main/com/smithsmodding/armory/weaponry/common/config/WeaponryConfigs.java +++ b/src/main/com/smithsmodding/armory/weaponry/common/config/WeaponryConfigs.java @@ -24,7 +24,7 @@ public static class ConfigurationHandler public static void init(File file) { if (config == null) { - config = new Configuration(new File(file.getParentFile().getAbsolutePath() + "\\armory\\Addons\\weaponry.cfg"), true); + config = new Configuration(new File(file.getParentFile(), "armory/Addons/weaponry.cfg"), true); loadWeaponryConfiguration(); } }