From 839a8bef134f28056a688ca2976919899a93448b Mon Sep 17 00:00:00 2001 From: Spiritreader Date: Thu, 15 Feb 2024 20:54:08 +0100 Subject: [PATCH] hopefully fix arm update loop (#690) --- AutoDarkModeSvc/AutoDarkModeSvc.csproj | 2 +- AutoDarkModeSvc/Handlers/UpdateHandler.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/AutoDarkModeSvc/AutoDarkModeSvc.csproj b/AutoDarkModeSvc/AutoDarkModeSvc.csproj index 2bc227381..ee72d49d9 100644 --- a/AutoDarkModeSvc/AutoDarkModeSvc.csproj +++ b/AutoDarkModeSvc/AutoDarkModeSvc.csproj @@ -5,7 +5,7 @@ net8.0-windows10.0.19041.0 10.0.18362.0 true - 10.4.2.11 + 10.4.2.12 AutoDarkModeSvc ..\adm_tray_new.ico AutoDarkModeSvc.Program diff --git a/AutoDarkModeSvc/Handlers/UpdateHandler.cs b/AutoDarkModeSvc/Handlers/UpdateHandler.cs index 01fc0a2ec..494f75f98 100644 --- a/AutoDarkModeSvc/Handlers/UpdateHandler.cs +++ b/AutoDarkModeSvc/Handlers/UpdateHandler.cs @@ -122,7 +122,9 @@ public static ApiResponse CheckNewVersion() UpstreamResponse = response; return response; } - else if (RuntimeInformation.OSArchitecture == Architecture.Arm64 && currentVersion.CompareTo(newVersion) == 0 && UpstreamVersion.PathFileArm != null) + else if (RuntimeInformation.OSArchitecture == Architecture.Arm64 + && RuntimeInformation.ProcessArchitecture != Architecture.Arm64 + && currentVersion.CompareTo(newVersion) == 0 && UpstreamVersion.PathFileArm != null) { Logger.Info($"upgrade to arm version available"); response.StatusCode = StatusCode.New;