From 789d728f7a5f53d52a8df70132068ff7693385bd Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Sat, 7 May 2022 12:42:53 -0300 Subject: [PATCH] prevent access error if you do workshop cl install but its already installed --- Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs b/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs index 643561f2c..355561b44 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/DebugConsole.cs @@ -1302,9 +1302,13 @@ namespace Barotrauma File.Move("System.Reflection.Metadata.dll", "System.Reflection.Metadata.dll.old", true); File.Move("System.Collections.Immutable.dll", "System.Collections.Immutable.dll.old", true); File.Move("System.Runtime.CompilerServices.Unsafe.dll", "System.Runtime.CompilerServices.Unsafe.dll.old", true); - + foreach (string file in filesToCopy) { + if (File.Exists(file)) + { + File.Move(file, file + ".todelete", true); + } File.Copy(Path.Combine(path, "Binary", file), file, true); }