From 1adc0a9bf75b204af1c6909de3e75f3db4afb865 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sat, 2 Jun 2018 16:08:49 -0400 Subject: [PATCH] Added config option to make ripme always try to update (for testing purposes) --- src/main/java/com/rarchives/ripme/ui/UpdateUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java index 9b78a7c8..868f00ac 100644 --- a/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java +++ b/src/main/java/com/rarchives/ripme/ui/UpdateUtils.java @@ -159,6 +159,10 @@ public class UpdateUtils { } private static boolean isNewerVersion(String latestVersion) { + // If we're testing the update utils we want the program to always try to update + if (Utils.getConfigBoolean("testing.always_try_to_update", false)) { + return true; + } int[] oldVersions = versionStringToInt(getThisJarVersion()); int[] newVersions = versionStringToInt(latestVersion); if (oldVersions.length < newVersions.length) {