From 0cee859e157b9b409f9be4396773fa22e7b4eac1 Mon Sep 17 00:00:00 2001 From: huanghongxun Date: Fri, 22 Nov 2019 10:57:40 +0800 Subject: [PATCH] always download missing files for server modpack --- .../hmcl/mod/server/ServerModpackCompletionTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/server/ServerModpackCompletionTask.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/server/ServerModpackCompletionTask.java index 9913557c4..8c2d566ea 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/server/ServerModpackCompletionTask.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/mod/server/ServerModpackCompletionTask.java @@ -113,8 +113,9 @@ public class ServerModpackCompletionTask extends Task { // If old modpack does not have this entry, download it download = true; } else if (!Files.exists(actualPath)) { - // If both old and new modpacks have this entry, but the file is deleted by user, leave it missing. - download = false; + // If both old and new modpacks have this entry, but the file is missing... + // Re-download it since network problem may cause file missing + download = true; } else { // If user modified this entry file, we will not replace this file since this modified file is that user expects. String fileHash = encodeHex(digest("SHA-1", Files.newInputStream(actualPath)));