Add system property to skip doing world backups when game registry changes. This is SEVERLY ill-advised, if you do this DO NOT ask for any support.

This commit is contained in:
Lex Manos 2014-07-07 17:25:09 -07:00
parent d969137b19
commit a8aac402eb
2 changed files with 30 additions and 3 deletions

View file

@ -65,8 +65,17 @@ public class GuiOldSaveLoadConfirm extends GuiYesNo implements GuiYesNoCallback
{
FMLLog.info("Capturing current state of world %s into file %s", saveName, zip.getAbsolutePath());
try
{
String skip = System.getProperty("fml.doNotBackup");
if (skip == null || !"true".equals(skip))
{
ZipperUtil.zip(new File(FMLClientHandler.instance().getSavesDir(), dirName), zip);
}
else
{
for (int x = 0; x < 10; x++)
FMLLog.severe("!!!!!!!!!! UPDATING WORLD WITHOUT DOING BACKUP !!!!!!!!!!!!!!!!");
}
} catch (IOException e)
{
FMLLog.log(Level.WARN, e, "There was a problem saving the backup %s. Please fix and try again", zip.getName());

View file

@ -368,9 +368,18 @@ public class GameData {
// backup
try
{
String skip = System.getProperty("fml.doNotBackup");
if (skip == null || !"true".equals(skip))
{
ZipperUtil.backupWorld();
}
else
{
for (int x = 0; x < 10; x++)
FMLLog.severe("!!!!!!!!!! UPDATING WORLD WITHOUT DOING BACKUP !!!!!!!!!!!!!!!!");
}
}
catch (IOException e)
{
StartupQuery.notify("The world backup couldn't be created.\n\n"+e);
@ -617,9 +626,18 @@ public class GameData {
if (!confirmed) StartupQuery.abort();
try
{
String skip = System.getProperty("fml.doNotBackup");
if (skip == null || !"true".equals(skip))
{
ZipperUtil.backupWorld();
}
else
{
for (int x = 0; x < 10; x++)
FMLLog.severe("!!!!!!!!!! UPDATING WORLD WITHOUT DOING BACKUP !!!!!!!!!!!!!!!!");
}
}
catch (IOException e)
{
StartupQuery.notify("The world backup couldn't be created.\n\n"+e);