From 067d8802b634ab8de4aba731cfd0e6780755dafd Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sat, 15 Oct 2022 00:55:44 +0700 Subject: [PATCH] change instance path resolving back to bin folder i dont think we need to place our instance at game dir by default --- Torch.Server/Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Torch.Server/Program.cs b/Torch.Server/Program.cs index 89ca281..142f653 100644 --- a/Torch.Server/Program.cs +++ b/Torch.Server/Program.cs @@ -89,8 +89,6 @@ namespace Torch.Server var workingDir = AppContext.BaseDirectory; var gamePath = configuration.GetValue("gamePath", workingDir); var binDir = Path.Combine(gamePath, "DedicatedServer64"); - - Directory.SetCurrentDirectory(gamePath); var instanceName = configuration.GetValue("instanceName", "Instance"); string instancePath; @@ -105,6 +103,8 @@ namespace Torch.Server instancePath = Directory.CreateDirectory(instanceName!).FullName; } + Directory.SetCurrentDirectory(gamePath); + return new ApplicationContext(new(workingDir), new(gamePath), new(binDir), new(instancePath), instanceName, isService); }