diff options
author | decebals <decebal.suiu@gmail.com> | 2019-12-11 21:03:51 +0200 |
---|---|---|
committer | decebals <decebal.suiu@gmail.com> | 2019-12-11 21:03:51 +0200 |
commit | 0794f5cab2a48dea480630f2140167bc1398234c (patch) | |
tree | 7e6a7c1bcd337f7c0c4b4d4bac1f0b4d14d7763b /pf4j/src/main/java/org | |
parent | d359ad77ac654883db56cf9376df9b2a98c18ff9 (diff) | |
download | pf4j-0794f5cab2a48dea480630f2140167bc1398234c.tar.gz pf4j-0794f5cab2a48dea480630f2140167bc1398234c.zip |
Resolve #355
Diffstat (limited to 'pf4j/src/main/java/org')
-rw-r--r-- | pf4j/src/main/java/org/pf4j/util/FileUtils.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pf4j/src/main/java/org/pf4j/util/FileUtils.java b/pf4j/src/main/java/org/pf4j/util/FileUtils.java index ba9dba1..a2a1534 100644 --- a/pf4j/src/main/java/org/pf4j/util/FileUtils.java +++ b/pf4j/src/main/java/org/pf4j/util/FileUtils.java @@ -230,7 +230,14 @@ public class FileUtils { } public static Path getPath(URI uri, String first, String... more) throws IOException { - return getFileSystem(uri).getPath(first, more); + FileSystem fileSystem = getFileSystem(uri); + Path path = fileSystem.getPath(first, more); + if ("jar".equals(uri.getScheme())) { + // it's a ZipFileSystem + fileSystem.close(); + } + + return path; } public static Path findFile(Path directoryPath, String fileName) { |