]> source.dussan.org Git - pf4j.git/commitdiff
Do nothing on delete if path not exists
authorDecebal Suiu <decebal.suiu@gmail.com>
Sun, 23 Jan 2022 21:41:28 +0000 (23:41 +0200)
committerDecebal Suiu <decebal.suiu@gmail.com>
Sun, 23 Jan 2022 21:41:28 +0000 (23:41 +0200)
pf4j/src/main/java/org/pf4j/util/FileUtils.java

index 429f33c78b89daf5dd7a6a3217f1e222e34f9cea..2f665956ca1071adebe2dcd4e2ee3826aa01b9f5 100644 (file)
@@ -82,6 +82,10 @@ public final class FileUtils {
      * @throws IOException if something goes wrong
      */
     public static void delete(Path path) throws IOException {
+        if (Files.notExists(path)) {
+            return;
+        }
+
         Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
 
            @Override