Fix overwriting Sandbox with stale cached version

This commit is contained in:
John Gross
2019-12-07 18:15:48 -08:00
parent 21fd997554
commit 540b17448a
4 changed files with 11 additions and 6 deletions

View File

@@ -198,6 +198,12 @@ namespace Torch.Server.Managers
public void SaveConfig()
{
if (((TorchServer)Torch).HasRun)
{
Log.Warn("Checkpoint cache is stale, not saving dedicated config.");
return;
}
DedicatedConfig.Save(Path.Combine(Torch.Config.InstancePath, CONFIG_NAME));
Log.Info("Saved dedicated config.");
@@ -308,7 +314,7 @@ namespace Torch.Server.Managers
}
OnPropertyChanged(nameof(Checkpoint));
OnPropertyChanged(nameof(WorldConfiguration));
OnPropertyChanged(nameof(WorldConfiguration));
}
}
}