[ 
https://issues.apache.org/jira/browse/MCLEAN-93?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guillaume Nodet reassigned MCLEAN-93:
-------------------------------------

    Assignee: Guillaume Nodet

> followSymLinks=false on Windows follows directory junctions
> -----------------------------------------------------------
>
>                 Key: MCLEAN-93
>                 URL: https://issues.apache.org/jira/browse/MCLEAN-93
>             Project: Maven Clean Plugin
>          Issue Type: Bug
>    Affects Versions: 2.6.1, 3.0.0, 3.1.0
>            Reporter: MiƂosz S
>            Assignee: Guillaume Nodet
>            Priority: Major
>
> On Windows there are symlinks AND "junctions":
> [https://docs.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions]
> And {{java.nio.file.Files.isSymbolicLink()}} is not detecting junctions, same 
> like {{org.apache.maven.shared.utils.io.FileUtils}} from 
> {{maven-shared-utils}}. To detect them, you should check for file attributes 
> of given {{Path}}:
> {code:java}
> Path p = Paths.get("C:\\some\\path")
> BasicFileAttributes attrs = Files.readAttributes(p, 
> BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS);
> boolean isJunction = attrs.isDirectory() && attrs.isOther();
> {code}
> ^Above solution suggested [here on JDK 
> JIRA|https://bugs.openjdk.java.net/browse/JDK-8031083?focusedCommentId=13444574&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-13444574]
> Related issue: MCLEAN-58



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to