Miłosz S opened MCLEAN-93 and commented
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:
Path p = Paths.get("C:\\some\\path")
BasicFileAttributes attrs = Files.readAttributes(p, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS);
boolean isJunction = attrs.isDirectory() && attrs.isOther();
^Above solution suggested here on JDK JIRA
Related issue: MCLEAN-58
Affects: 2.6.1, 3.0.0, 3.1.0
Remote Links:
Miłosz S opened MCLEAN-93 and commented
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 likeorg.apache.maven.shared.utils.io.FileUtilsfrommaven-shared-utils. To detect them, you should check for file attributes of givenPath:^Above solution suggested here on JDK JIRA
Related issue: MCLEAN-58
Affects: 2.6.1, 3.0.0, 3.1.0
Remote Links: