Moves the interface DLL to the root server folder

This commit is contained in:
Cyberboss
2017-09-21 14:45:48 -04:00
parent b41091c4a3
commit e3f9737f24
3 changed files with 6 additions and 13 deletions
+3 -3
View File
@@ -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))
-7
View File
@@ -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;
+3 -3
View File
@@ -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