diff --git a/TGServerService/Compiler.cs b/TGServerService/Compiler.cs index f6fad6f544..2292f5b245 100644 --- a/TGServerService/Compiler.cs +++ b/TGServerService/Compiler.cs @@ -203,8 +203,8 @@ namespace TGServerService CreateSymlink(Path.Combine(GameDirA, I), Path.Combine(StaticDirs, I)); } - CreateSymlink(Path.Combine(GameDirA, InterfaceDLLName), Path.Combine(StaticDirs, InterfaceDLLName)); - CreateSymlink(Path.Combine(GameDirB, InterfaceDLLName), Path.Combine(StaticDirs, InterfaceDLLName)); + CreateSymlink(Path.Combine(GameDirA, InterfaceDLLName), InterfaceDLLName); + CreateSymlink(Path.Combine(GameDirB, InterfaceDLLName), InterfaceDLLName); CreateSymlink(GameDirLive, GameDirA); @@ -344,7 +344,7 @@ namespace TGServerService } if (!File.Exists(Path.Combine(resurrectee, InterfaceDLLName))) - CreateSymlink(Path.Combine(resurrectee, InterfaceDLLName), Path.Combine(StaticDirs, InterfaceDLLName)); + CreateSymlink(Path.Combine(resurrectee, InterfaceDLLName), InterfaceDLLName); bool repobusy_check = false; if (!Monitor.TryEnter(RepoLock)) diff --git a/TGServerService/Config.cs b/TGServerService/Config.cs index d7c5cc9511..8ff2a875a8 100644 --- a/TGServerService/Config.cs +++ b/TGServerService/Config.cs @@ -173,14 +173,7 @@ namespace TGServerService } if (fi.Exists) - { - if (fi.Name == InterfaceDLLName) - { - unauthorized = false; - return "Cannot delete the interface DLL!"; - } File.Delete(path); - } else if (Directory.Exists(path)) Program.DeleteDirectory(path); unauthorized = false; diff --git a/TGServerService/DreamDaemon.cs b/TGServerService/DreamDaemon.cs index 825f8a5c41..1786172a26 100644 --- a/TGServerService/DreamDaemon.cs +++ b/TGServerService/DreamDaemon.cs @@ -368,12 +368,12 @@ namespace TGServerService void UpdateInterfaceDll(bool overwrite) { - var targetPath = Path.Combine(StaticDirs, InterfaceDLLName); - if (File.Exists(targetPath) && !overwrite) + var targetPath = InterfaceDLLName; + if (File.Exists(InterfaceDLLName) && !overwrite) return; //Copy the interface dll to the static dir var InterfacePath = Assembly.GetAssembly(typeof(DDInteropCallHolder)).Location; - Program.CopyFileForceDirectories(InterfacePath, targetPath, true); + File.Copy(InterfacePath, InterfaceDLLName, overwrite); } //used by Start and Watchdog to start a DD instance