1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-24 02:44:17 +00:00

Change is_older_than_installed so that it no longer detects the current update as a new one (#639)

This commit is contained in:
asimon-1 2023-09-17 14:17:45 -04:00 committed by GitHub
parent 04e56a2f48
commit c81ad0ad41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,7 +71,7 @@ impl Release {
// //
// https://datatracker.ietf.org/doc/html/rfc3339#section-5.1 // https://datatracker.ietf.org/doc/html/rfc3339#section-5.1
let current_version = CURRENT_VERSION.lock(); 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() 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() { if release_to_apply.as_ref().unwrap().is_older_than_installed() {
release_to_apply = Err(anyhow!( release_to_apply = Err(anyhow!(
"Update is older than the current installed version.", "Github version is not newer than the current installed version.",
)) ))
} }
} }