Skip to content

Commit

Permalink
Merge pull request #214 from Cyberboss/RipData [TGSDeploy]
Browse files Browse the repository at this point in the history
Directory deletion no longer recurses into symlinks
  • Loading branch information
Cyberboss authored Sep 24, 2017
2 parents 8951c87 + 675a245 commit 9ea14db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
13 changes: 0 additions & 13 deletions TGServerService/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,9 @@ void CleanGameFolder()
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);
}
Expand Down
6 changes: 5 additions & 1 deletion TGServerService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public static void DeleteDirectory(string path, bool ContentsOnly = false, IList
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)
{
Expand Down
6 changes: 3 additions & 3 deletions Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
// [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")]

0 comments on commit 9ea14db

Please sign in to comment.