Added a hacky, but working way to have directory simbolic links for now.

This commit is contained in:
Karolis2011
2019-08-19 23:35:43 +03:00
parent 0018f804a1
commit 913b69bdf4
3 changed files with 334 additions and 1 deletions

View File

@@ -90,7 +90,7 @@ namespace ASS.Server.Services
throw new Exception($"Byond version '{version.Major}.{version.Minor}' data mismatches folder name or ByondVersion data. Please manually remove this version.");
if (Directory.Exists(GetByondDirectoryPath()))
Directory.Delete(GetByondDirectoryPath());
Emet.FileSystems.FileSystem.CreateSymbolicLink(getByondVersionDirectoryName(version), GetByondDirectoryPath());
FileSystemHelper.CreateRelativeSymbolicLink(GetByondDirectoryPath(version), GetByondDirectoryPath(), Emet.FileSystems.FileType.Directory);
if (!version.Equals(getVersion()))
throw new Exception($"Byond version switch failed.");
}