diff --git a/Torch.Server/Initializer.cs b/Torch.Server/Initializer.cs index b141d90..8c1c4d4 100644 --- a/Torch.Server/Initializer.cs +++ b/Torch.Server/Initializer.cs @@ -63,13 +63,13 @@ quit"; var apiSource = Path.Combine(basePath, "DedicatedServer64", "steam_api64.dll"); var apiTarget = Path.Combine(basePath, "steam_api64.dll"); - if (!File.Exists(apiTarget)) + if (!File.Exists(apiTarget) || File.GetLastWriteTime(apiTarget) < File.GetLastWriteTime(apiSource)) File.Copy(apiSource, apiTarget); var havokSource = Path.Combine(basePath, "DedicatedServer64", "Havok.dll"); var havokTarget = Path.Combine(basePath, "Havok.dll"); - if (!File.Exists(havokTarget)) + if (!File.Exists(havokTarget) || File.GetLastWriteTime(havokTarget) < File.GetLastWriteTime(havokSource)) File.Copy(havokSource, havokTarget); _config = InitConfig(); diff --git a/Torch.Server/Program.cs b/Torch.Server/Program.cs index 4e48a1e..9abb67c 100644 --- a/Torch.Server/Program.cs +++ b/Torch.Server/Program.cs @@ -35,7 +35,6 @@ namespace Torch.Server var badDlls = new[] { "System.Security.Principal.Windows.dll", - "steam_api64.dll" }; try @@ -46,9 +45,11 @@ namespace Torch.Server File.Delete(file); } } - catch + catch (Exception e) { - LogManager.GetCurrentClassLogger().Error($"Error updating. Please delete the following files from the Torch root folder manually:\r\n{string.Join("\r\n", badDlls)}"); + var log = LogManager.GetCurrentClassLogger(); + log.Error($"Error updating. Please delete the following files from the Torch root folder manually:\r\n{string.Join("\r\n", badDlls)}"); + log.Error(e); return; }