Skip to content

Commit 73ce872

Browse files
committed
修复 Unzipper 解压空 zip 文件时抛出异常的问题
1 parent 66e75fd commit 73ce872

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)