Merge pull request #214 from Cyberboss/RipData [TGSDeploy]

Directory deletion no longer recurses into symlinks
This commit is contained in:
Jordan Brown
2017-09-24 15:18:14 -04:00
committed by GitHub
3 changed files with 8 additions and 17 deletions
-13
View File
@@ -141,22 +141,9 @@ namespace TGServerService
if (Directory.Exists(Path.Combine(GameDirA, InterfaceDLLName)))
Directory.Delete(Path.Combine(GameDirA, InterfaceDLLName));
var Config = LoadRepoConfig();
if (Config != null)
{
CleanGameFolderList(GameDirA, Config.StaticDirectoryPaths);
CleanGameFolderList(GameDirA, Config.DLLPaths);
}
if (Directory.Exists(Path.Combine(GameDirB, InterfaceDLLName)))
Directory.Delete(Path.Combine(GameDirB, InterfaceDLLName));
if (Config != null)
{
CleanGameFolderList(GameDirB, Config.StaticDirectoryPaths);
CleanGameFolderList(GameDirB, Config.DLLPaths);
}
if (Directory.Exists(GameDirLive))
Directory.Delete(GameDirLive);
}
+5 -1
View File
@@ -30,7 +30,11 @@ namespace TGServerService
if (excludeRoot != null)
for (var I = 0; I < excludeRoot.Count; ++I)
excludeRoot[I] = excludeRoot[I].ToLower();
if (!di.Attributes.HasFlag(FileAttributes.Directory))
{ //this is probably a symlink
Directory.Delete(di.FullName);
return;
}
NormalizeAndDelete(di, excludeRoot);
if (!ContentsOnly)
{
+3 -3
View File
@@ -12,6 +12,6 @@ using System.Reflection;
// [assembly: AssemblyVersion("1.0.*")]
//It's impossible to make these a define, don't say I didn't warn you
[assembly: AssemblyVersion("3.1.0.4")]
[assembly: AssemblyFileVersion("3.1.0.4")]
[assembly: AssemblyInformationalVersion("3.1.0.4")]
[assembly: AssemblyVersion("3.1.0.5")]
[assembly: AssemblyFileVersion("3.1.0.5")]
[assembly: AssemblyInformationalVersion("3.1.0.5")]