RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2]
Brian Burkhalter
bpb at openjdk.org
Thu Aug 14 16:20:11 UTC 2025
On Thu, 14 Aug 2025 15:18:46 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> No, but I'll investigate.
>
>> Did you try to using UnixFileAttribtues.getIfExists?
>
> I think you're correct that this would speed up the common case a bit, but as implied, it would require adding `getIfExists` which does not follow links.
For some reason TBD, `UnixFileAttributes.get` succeeds with a symlink loop but `UnixFileAttributes.getIfExists` fails with `ELOOP`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277090826
More information about the nio-dev
mailing list