Skip to content

Commit d48a3c2

Browse files
authored
[release/3.10] 修复 Unzipper 解压空 zip 文件时抛出异常的问题 (#5353)
#5267
1 parent a0f9ba1 commit d48a3c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HMCLCore/src/main/java/org/jackhuang/hmcl/util/io/Unzipper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public void unzip() throws IOException {
152152
}
153153
}
154154

155-
if (entryCount == 0 && !terminateIfSubDirectoryNotExists) {
155+
if (entryCount == 0 && !"/".equals(subDirectory) && !terminateIfSubDirectoryNotExists) {
156156
throw new NoSuchFileException("Subdirectory " + subDirectory + " does not exist in the zip file.");
157157
}
158158
}

0 commit comments

Comments
 (0)