From 5c0ac30bf9a749f69e84949ebfd32adafc38fa86 Mon Sep 17 00:00:00 2001 From: AlgorithmX2 Date: Thu, 19 Jun 2014 16:15:34 -0500 Subject: [PATCH] Prevent Config from saving during loading process. --- core/AEConfig.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/AEConfig.java b/core/AEConfig.java index 8b13491b..7a1b3a59 100644 --- a/core/AEConfig.java +++ b/core/AEConfig.java @@ -96,6 +96,8 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo public int portablecell_battery = 20000; public int staff_battery = 8000; + public boolean updateable = false; + public AEConfig(String path) { super( new File( path + "AppliedEnergistics2.cfg" ) ); @@ -216,6 +218,8 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo latestTimeStamp = 0; } } + + updateable = true; } private String getListComment(Enum value) @@ -252,7 +256,8 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo } } - save(); + if ( updateable ) + save(); } @Override