From 642186678e0b521c0248fc42433817ef7367b90c Mon Sep 17 00:00:00 2001 From: Brant Martin Date: Mon, 25 Feb 2019 12:55:04 -0500 Subject: [PATCH] Fix new world generator breaking with non-default instance paths #286 --- Torch.Server/Views/WorldGeneratorDialog.xaml.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Torch.Server/Views/WorldGeneratorDialog.xaml.cs b/Torch.Server/Views/WorldGeneratorDialog.xaml.cs index cfbfad8..45b7a01 100644 --- a/Torch.Server/Views/WorldGeneratorDialog.xaml.cs +++ b/Torch.Server/Views/WorldGeneratorDialog.xaml.cs @@ -74,8 +74,9 @@ namespace Torch.Server private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { string worldName = string.IsNullOrEmpty(WorldName.Text) ? _currentItem.Name : WorldName.Text; - var worldPath = Path.Combine("Instance", "Saves", worldName); - var checkpoint= _currentItem.Checkpoint; + + var worldPath = Path.Combine(TorchBase.Instance.Config.InstancePath, "Saves", worldName); + var checkpoint = _currentItem.Checkpoint; if (Directory.Exists(worldPath)) { MessageBox.Show("World already exists with that name.");