diff --git a/pf4j/src/main/java/org/pf4j/util/FileUtils.java b/pf4j/src/main/java/org/pf4j/util/FileUtils.java index 7bd7abe..0cb8784 100644 --- a/pf4j/src/main/java/org/pf4j/util/FileUtils.java +++ b/pf4j/src/main/java/org/pf4j/util/FileUtils.java @@ -176,14 +176,6 @@ public class FileUtils { Path pluginDirectory = filePath.resolveSibling(directoryName); if (!Files.exists(pluginDirectory) || pluginZipDate.compareTo(Files.getLastModifiedTime(pluginDirectory)) > 0) { - // do not overwrite an old version, remove it - if (Files.exists(pluginDirectory)) { - FileUtils.delete(pluginDirectory); - } - - // create root for plugin - Files.createDirectories(pluginDirectory); - // expand '.zip' file Unzip unzip = new Unzip(); unzip.setSource(filePath.toFile());