From 9ba2a10cb8e3dcc28896d257019915581c12c36e Mon Sep 17 00:00:00 2001 From: Simon Martens Date: Tue, 30 Sep 2025 21:36:10 +0200 Subject: [PATCH] Some stuff --- HaWeb/Controllers/APIController.cs | 4 ++-- HaWeb/FileHelpers/XMLFileProvider.cs | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/HaWeb/Controllers/APIController.cs b/HaWeb/Controllers/APIController.cs index 144bd60..29286d6 100644 --- a/HaWeb/Controllers/APIController.cs +++ b/HaWeb/Controllers/APIController.cs @@ -81,12 +81,12 @@ public class APIController : Controller { [FeatureGate(Features.SyntaxCheck, Features.AdminService)] public async Task?>> GetSyntaxCheck(string? id) { var SCCache = _xmlService.GetSCCache(); - if (_xmlProvider.HasChanged() || SCCache == null) { + if (SCCache == null) { await _syntaxCheckLock.WaitAsync(); try { // Double-check after acquiring lock SCCache = _xmlService.GetSCCache(); - if (_xmlProvider.HasChanged() || SCCache == null) { + if (SCCache == null) { var commit = _xmlProvider.GetGitState(); SCCache = _xmlService.Test(_xmlService.GetState(), commit != null ? commit.Commit : string.Empty); _xmlService.SetSCCache(SCCache); diff --git a/HaWeb/FileHelpers/XMLFileProvider.cs b/HaWeb/FileHelpers/XMLFileProvider.cs index cb35283..276211f 100644 --- a/HaWeb/FileHelpers/XMLFileProvider.cs +++ b/HaWeb/FileHelpers/XMLFileProvider.cs @@ -49,10 +49,8 @@ public class XMLFileProvider : IXMLFileProvider { _hamannFileProvider = new PhysicalFileProvider(hamannPath); _workingTreeFileProvider = new PhysicalFileProvider(gitPath); - // Pull latest changes on startup (if repo exists) - if (_GitService.GetGitState() != null) { - _GitService.Pull(); - } + // Pull latest changes on startup + _GitService.Pull(); // Create File Lists; Here and in xmlservice, which does preliminary checking Scan();