Skip to content

Commit a9c14bf

Browse files
authored
[release/3.8] 修复从 BMCLAPI 下载部分旧文件时校验失败的问题 (#4981)
#4949
1 parent 6ef823b commit a9c14bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HMCLCore/src/main/java/org/jackhuang/hmcl/task/FileDownloadTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ protected Context getContext(HttpResponse<?> response, boolean checkETag, String
193193
if (integrityCheck != null) {
194194
algorithm = integrityCheck.getAlgorithm();
195195
checksum = integrityCheck.getChecksum();
196-
} else if (bmclapiHash != null) {
196+
} else if (bmclapiHash != null && DigestUtils.isSha1Digest(bmclapiHash)) {
197197
algorithm = "SHA-1";
198198
checksum = bmclapiHash;
199199
} else {

0 commit comments

Comments
 (0)