diff --git a/Torch.Server/Initializer.cs b/Torch.Server/Initializer.cs index 78167b1..42325a4 100644 --- a/Torch.Server/Initializer.cs +++ b/Torch.Server/Initializer.cs @@ -171,9 +171,10 @@ quit"; File.Delete(STEAMCMD_ZIP); log.Info("SteamCMD downloaded successfully!"); } - catch + catch (Exception e) { log.Error("Failed to download SteamCMD, unable to update the DS."); + log.Error(e); return; } } diff --git a/Torch.Server/Program.cs b/Torch.Server/Program.cs index aca5ab4..ea59df0 100644 --- a/Torch.Server/Program.cs +++ b/Torch.Server/Program.cs @@ -31,11 +31,17 @@ namespace Torch.Server Directory.SetCurrentDirectory(workingDir); //HACK for block skins update - foreach (var f in Directory.EnumerateFiles(workingDir, "System.*", SearchOption.TopDirectoryOnly)) + var badDlls = new[] { - File.Delete(f); - } + "System.Security.Principal.Windows.dll" + }; + foreach (var file in badDlls) + { + if (File.Exists(file)) + File.Delete(file); + } + if (!TorchLauncher.IsTorchWrapped()) { TorchLauncher.Launch(Assembly.GetEntryAssembly().FullName, args, binDir); diff --git a/Torch.Server/Torch.Server.csproj b/Torch.Server/Torch.Server.csproj index c6548df..fe9b5e6 100644 --- a/Torch.Server/Torch.Server.csproj +++ b/Torch.Server/Torch.Server.csproj @@ -516,6 +516,6 @@ - copy "$(SolutionDir)NLog.config" "$(TargetDir)" & copy "$(SolutionDir)NLog-user.config" "$(TargetDir)" & del "$(TargetDir)System.*" + copy "$(SolutionDir)NLog.config" "$(TargetDir)" & copy "$(SolutionDir)NLog-user.config" "$(TargetDir)" \ No newline at end of file