diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/DownloadUtils.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/DownloadUtils.java index 367b415d1..b4df71409 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/DownloadUtils.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/utils/DownloadUtils.java @@ -137,7 +137,11 @@ public class DownloadUtils { public static T ensureSha1(File outputFile, @Nullable String sha1, Callable downloadFunction) throws IOException { // Skip if needed - if(sha1 == null) return downloadFile(downloadFunction); + if(sha1 == null) { + // If the file exists and we don't know it's SHA1, don't try to redownload it. + if(outputFile.exists()) return null; + else return downloadFile(downloadFunction); + } int attempts = 0; boolean fileOkay = verifyFile(outputFile, sha1);