From fe985e1a9c43b38b583476e3bfe99e824a596fde Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Thu, 12 Jan 2023 23:20:44 +0700 Subject: [PATCH] fix restart again --- Torch.Server/TorchServer.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Torch.Server/TorchServer.cs b/Torch.Server/TorchServer.cs index 1ce2f7c..6342c56 100644 --- a/Torch.Server/TorchServer.cs +++ b/Torch.Server/TorchServer.cs @@ -3,11 +3,10 @@ using System; using System.Collections.Generic; using System.Diagnostics; +using System.IO; using System.Linq; -using System.Reflection; using System.Text; using System.Threading; -using System.Threading.Tasks; using Microsoft.Diagnostics.Runtime; using NLog; using PropertyChanged; @@ -21,8 +20,6 @@ using Torch.API.Session; using Torch.Commands; using Torch.Managers.PatchManager; using Torch.Mod; -using Torch.Mod.Messages; -using Torch.Patches; using Torch.Server.Commands; using Torch.Server.Managers; using Torch.Utils; @@ -211,7 +208,7 @@ namespace Torch.Server Environment.Exit(0); #endif - var exe = Assembly.GetExecutingAssembly().Location.Replace("dll", "exe"); + var exe = Path.Combine(AppContext.BaseDirectory, "Torch.Server.exe"); var args = Environment.GetCommandLineArgs();