From c81ad0ad41ee72fae5066c7284994d2028842bb6 Mon Sep 17 00:00:00 2001 From: asimon-1 <40246417+asimon-1@users.noreply.github.com> Date: Sun, 17 Sep 2023 14:17:45 -0400 Subject: [PATCH] Change is_older_than_installed so that it no longer detects the current update as a new one (#639) --- src/common/release.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/release.rs b/src/common/release.rs index 205c269..efe71e5 100644 --- a/src/common/release.rs +++ b/src/common/release.rs @@ -71,7 +71,7 @@ impl Release { // // https://datatracker.ietf.org/doc/html/rfc3339#section-5.1 let current_version = CURRENT_VERSION.lock(); - self.published_at.as_str() < current_version.as_str() + self.published_at.as_str() <= current_version.as_str() } } @@ -193,7 +193,7 @@ pub fn perform_version_check() { drop(current_version); // Explicitly unlock, since we also acquire a lock in is_older_than_installed() if release_to_apply.as_ref().unwrap().is_older_than_installed() { release_to_apply = Err(anyhow!( - "Update is older than the current installed version.", + "Github version is not newer than the current installed version.", )) } }