From: Decebal Suiu Date: Tue, 21 Apr 2020 18:07:58 +0000 (+0300) Subject: Fix #371 X-Git-Tag: release-3.3.1~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4fca1aa2e45a9caa4636b2c4ebb020f25d905afe;p=pf4j.git Fix #371 --- diff --git a/pf4j/src/main/java/org/pf4j/util/FileUtils.java b/pf4j/src/main/java/org/pf4j/util/FileUtils.java index a2a1534..092ef3b 100644 --- a/pf4j/src/main/java/org/pf4j/util/FileUtils.java +++ b/pf4j/src/main/java/org/pf4j/util/FileUtils.java @@ -232,7 +232,8 @@ public class FileUtils { public static Path getPath(URI uri, String first, String... more) throws IOException { FileSystem fileSystem = getFileSystem(uri); Path path = fileSystem.getPath(first, more); - if ("jar".equals(uri.getScheme())) { + boolean isWindowsOS = System.getProperty("os.name").startsWith("Windows"); + if (isWindowsOS && "jar".equals(uri.getScheme())) { // it's a ZipFileSystem fileSystem.close(); }