diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsConf.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 35252532f..ec6e27b53 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -110,9 +110,10 @@ public class EssentialsConf extends Configuration super.load(); } catch (RuntimeException e) - { - LOGGER.log(Level.SEVERE, "File broken: " + configFile.toString()); - throw e; + { + File broken = new File(configFile.getAbsolutePath() + ".broken." + System.currentTimeMillis()); + configFile.renameTo(broken); + LOGGER.log(Level.SEVERE, "The file " + configFile.toString() + " is broken, it has been renamed to " + broken.toString(), e.getCause()); } if (this.root == null) |