From 65aad1d28cfb401b88f49e3b76b577f0770cf38a Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Mon, 16 Oct 2017 12:25:55 -0400 Subject: [PATCH] Fixes parsing of synchronize directories in TGS3.json --- TGServerService/Repository.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/TGServerService/Repository.cs b/TGServerService/Repository.cs index 89cb815326..3f2a6cc469 100644 --- a/TGServerService/Repository.cs +++ b/TGServerService/Repository.cs @@ -46,7 +46,7 @@ namespace TGServerService public readonly string PathToChangelogPy; public readonly string ChangelogPyArguments; public readonly IList PipDependancies = new List(); - public readonly IList ChangelogPathsToStage = new List(); + public readonly IList PathsToStage = new List(); public readonly IList StaticDirectoryPaths = new List(); public readonly IList DLLPaths = new List(); @@ -69,16 +69,16 @@ namespace TGServerService PipDependancies = LoadArray(details["pip_dependancies"]); } catch { } - try - { - ChangelogPathsToStage = LoadArray(details["synchronize_paths"]); - } - catch { } } catch { ChangelogSupport = false; } try + { + PathsToStage = LoadArray(json["synchronize_paths"]); + } + catch { } + try { StaticDirectoryPaths = LoadArray(json["static_directories"]); } @@ -114,7 +114,7 @@ namespace TGServerService && PathToChangelogPy == other.PathToChangelogPy && ChangelogPyArguments == other.ChangelogPyArguments && ListEquals(PipDependancies, other.PipDependancies) - && ListEquals(ChangelogPathsToStage, other.ChangelogPathsToStage) + && ListEquals(PathsToStage, other.PathsToStage) && ListEquals(StaticDirectoryPaths, other.StaticDirectoryPaths) && ListEquals(DLLPaths, other.DLLPaths); } @@ -126,7 +126,7 @@ namespace TGServerService hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(PathToChangelogPy); hashCode = hashCode * -1521134295 + EqualityComparer.Default.GetHashCode(ChangelogPyArguments); hashCode = hashCode * -1521134295 + EqualityComparer>.Default.GetHashCode(PipDependancies); - hashCode = hashCode * -1521134295 + EqualityComparer>.Default.GetHashCode(ChangelogPathsToStage); + hashCode = hashCode * -1521134295 + EqualityComparer>.Default.GetHashCode(PathsToStage); hashCode = hashCode * -1521134295 + EqualityComparer>.Default.GetHashCode(StaticDirectoryPaths); hashCode = hashCode * -1521134295 + EqualityComparer>.Default.GetHashCode(DLLPaths); return hashCode; @@ -1010,7 +1010,7 @@ namespace TGServerService try { // Stage the file - foreach(var I in Config.ChangelogPathsToStage) + foreach(var I in Config.PathsToStage) Commands.Stage(Repo, I); if (Repo.RetrieveStatus().Staged.Count() == 0) //nothing to commit