aboutsummaryrefslogtreecommitdiffstats
path: root/pf4j
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2020-04-21 21:07:58 +0300
committerDecebal Suiu <decebal.suiu@gmail.com>2020-04-21 21:07:58 +0300
commit4fca1aa2e45a9caa4636b2c4ebb020f25d905afe (patch)
tree7897f291985d9ff2fb055135e30184a0b242902b /pf4j
parentba53ffb65f38a9451d2a81320849d3c2b4051de1 (diff)
downloadpf4j-4fca1aa2e45a9caa4636b2c4ebb020f25d905afe.tar.gz
pf4j-4fca1aa2e45a9caa4636b2c4ebb020f25d905afe.zip
Fix #371
Diffstat (limited to 'pf4j')
-rw-r--r--pf4j/src/main/java/org/pf4j/util/FileUtils.java3
1 files changed, 2 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 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();
}