Skip to content

Commit b591b60

Browse files
Fix zip parsing
1 parent 554dbb5 commit b591b60

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/main/java/qupath/bioimageio/spec/Model.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -426,13 +426,12 @@ private static Path findRdf(Path path, Collection<String> names) throws IOExcept
426426
}
427427
} else if (path.toAbsolutePath().toString().toLowerCase().endsWith(".zip")) {
428428
// Check zip file
429-
try (var fs = FileSystems.newFileSystem(path, (ClassLoader) null)) {
430-
for (var dir : fs.getRootDirectories()) {
431-
for (var name : MODEL_NAMES) {
432-
var p = dir.resolve(name);
433-
if (Files.exists(p))
434-
return p;
435-
}
429+
var fs = FileSystems.newFileSystem(path, (ClassLoader) null);
430+
for (var dir : fs.getRootDirectories()) {
431+
for (var name : MODEL_NAMES) {
432+
var p = dir.resolve(name);
433+
if (Files.exists(p))
434+
return p;
436435
}
437436
}
438437
}

0 commit comments

Comments
 (0)