From ad3e7501cab36caccfc1bb1ab0987d9c3c6cdb4f Mon Sep 17 00:00:00 2001 From: ZekerZhayard Date: Sat, 11 Dec 2021 15:41:15 +0800 Subject: [PATCH] Temporary files that are not used at runtime are now not checked. --- .../forgewrapper/installer/detector/IFileDetector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/zekerzhayard/forgewrapper/installer/detector/IFileDetector.java b/src/main/java/io/github/zekerzhayard/forgewrapper/installer/detector/IFileDetector.java index 7e56bb4..1bb024a 100644 --- a/src/main/java/io/github/zekerzhayard/forgewrapper/installer/detector/IFileDetector.java +++ b/src/main/java/io/github/zekerzhayard/forgewrapper/installer/detector/IFileDetector.java @@ -205,7 +205,7 @@ public interface IFileDetector { * @return True represents the file is ready. */ default boolean checkExtraFile(Path path, String sha1) { - return Files.isRegularFile(path) && (sha1 == null || sha1.equals("") || sha1.toLowerCase(Locale.ENGLISH).equals(getFileSHA1(path))); + return sha1 == null || sha1.equals("") || (isFile(path) && sha1.toLowerCase(Locale.ENGLISH).equals(getFileSHA1(path))); } static boolean isFile(Path path) {