Ignore symlinks that point to non-existing paths (i.e. use LinkOption.NOFOLLOW_LINKS)

This commit is contained in:
Reinhard Pointner 2017-10-29 17:22:05 +01:00
parent a3085de6fc
commit 13d0a0cd96
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}