From 13d0a0cd96905eb10ed5a33b1c71f4a8d6d13546 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 29 Oct 2017 17:22:05 +0100 Subject: [PATCH] Ignore symlinks that point to non-existing paths (i.e. use LinkOption.NOFOLLOW_LINKS) --- source/net/filebot/util/FileUtilities.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/filebot/util/FileUtilities.java b/source/net/filebot/util/FileUtilities.java index 0a9df7e6..3ca92c1d 100644 --- a/source/net/filebot/util/FileUtilities.java +++ b/source/net/filebot/util/FileUtilities.java @@ -115,7 +115,7 @@ public final class FileUtilities { // create parent folder if necessary and make sure that the folder structure is created, and throw exception if the folder structure can't be created Path parentFolder = destination.toPath().getParent(); - if (Files.notExists(parentFolder)) { + if (Files.notExists(parentFolder, LinkOption.NOFOLLOW_LINKS)) { Files.createDirectories(parentFolder); }