From c6b0d4646e58a8c09097f93d5dda078f964ae06d Mon Sep 17 00:00:00 2001 From: Aptivi CEO Date: Fri, 6 Sep 2024 14:35:51 +0300 Subject: [PATCH] chg - Fixed update manager nullables --- Type: chg Breaking: False Doc Required: False Backport Required: False Part: 1/1 --- public/Nitrocid/Kernel/Starting/KernelStageActions.cs | 4 ++-- public/Nitrocid/Kernel/Updates/UpdateManager.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/Nitrocid/Kernel/Starting/KernelStageActions.cs b/public/Nitrocid/Kernel/Starting/KernelStageActions.cs index feff0f7d6..691456440 100644 --- a/public/Nitrocid/Kernel/Starting/KernelStageActions.cs +++ b/public/Nitrocid/Kernel/Starting/KernelStageActions.cs @@ -89,9 +89,9 @@ internal static void Stage02KernelUpdates() UpdateManager.CheckKernelUpdates(); #if SPECIFIERREL string upgradedPath = PathsManagement.TempPath + "/.upgraded"; - if (!Checking.FileExists(upgradedPath) || Reading.ReadContents(upgradedPath)[0] != KernelMain.Version.ToString()) + if (!Checking.FileExists(upgradedPath) || Reading.ReadContents(upgradedPath)[0] != KernelMain.Version?.ToString()) { - Writing.WriteContentsText(upgradedPath, KernelMain.Version.ToString()); + Writing.WriteContentsText(upgradedPath, KernelMain.Version?.ToString() ?? "0.0.0.0"); SplashManager.BeginSplashOut(SplashManager.CurrentSplashContext); string changes = UpdateManager.GetVersionChangelogs(); InfoBoxButtonsColor.WriteInfoBoxButtons([ diff --git a/public/Nitrocid/Kernel/Updates/UpdateManager.cs b/public/Nitrocid/Kernel/Updates/UpdateManager.cs index 7242e7ecc..d072607c3 100644 --- a/public/Nitrocid/Kernel/Updates/UpdateManager.cs +++ b/public/Nitrocid/Kernel/Updates/UpdateManager.cs @@ -141,7 +141,7 @@ public static void CheckKernelUpdates() var AvailableUpdate = FetchBinaryArchive(); if (AvailableUpdate is not null) { - if (!AvailableUpdate.Updated) + if (!AvailableUpdate.Updated && AvailableUpdate.UpdateVersion is not null) { SplashReport.ReportProgress(Translate.DoTranslation("Found new version: "), 10); SplashReport.ReportProgress(AvailableUpdate.UpdateVersion.ToString(), 10);