mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-26 14:37:44 +01:00
Moves the interface DLL to the root server folder
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user