mirror of
https://github.com/LegacyModdingMC/UniMixins.git
synced 2026-11-21 12:52:16 +00:00
Instead of deleting old config, just rename it
Deleting people's configs isn't nice, even if it's just a single boolean.
This commit is contained in:
1 parent
a05507f043
commit
c47e2aefbc
1 file changed
+4
-3
+4
-3
@@ -7,12 +7,13 @@ import java.io.File;
|
||||
public class ConfigUtil {
|
||||
|
||||
public static void load(Class<?> cls) {
|
||||
File oldConfigFile = new File("config/unimixins.cfg");
|
||||
File configDir = new File(Launch.minecraftHome, "config");
|
||||
File oldConfigFile = new File(configDir, "unimixins.cfg");
|
||||
if(oldConfigFile.exists()) {
|
||||
oldConfigFile.delete();
|
||||
oldConfigFile.renameTo(new File(configDir, "unimixins.old.delete_me.cfg"));
|
||||
}
|
||||
|
||||
AnnotatedProperties.load(new File(Launch.minecraftHome, "config/unimixins.properties"), cls);
|
||||
AnnotatedProperties.load(new File(configDir, "unimixins.properties"), cls);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user