diff options
-rw-r--r-- | src/main/java/org/openslx/taskmanager/tasks/Symlink.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/Symlink.java b/src/main/java/org/openslx/taskmanager/tasks/Symlink.java index 44919fc..3dfba02 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/Symlink.java +++ b/src/main/java/org/openslx/taskmanager/tasks/Symlink.java @@ -2,6 +2,7 @@ package org.openslx.taskmanager.tasks; import java.io.File; import java.nio.file.Files; +import java.nio.file.LinkOption; import java.nio.file.Paths; import org.apache.commons.io.FileUtils; @@ -79,7 +80,7 @@ public class Symlink extends AbstractTask */ public static boolean deleteRecursiveIfExists( File item ) { - if ( !item.exists() ) + if ( !Files.exists( item.toPath(), LinkOption.NOFOLLOW_LINKS ) ) return true; boolean ret = true; if ( !Files.isSymbolicLink( item.toPath() ) && item.isDirectory() ) { |