RFR: 8368165: (fs) Path.toRealPath does not perform correctly for symbolic links in a mapped drive (win)
Brian Burkhalter
bpb at openjdk.org
Wed Oct 29 00:58:28 UTC 2025
On Wed, 29 Oct 2025 00:52:18 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> If `getFinalPath` throws an exception, or converts a drive path to a UNC path, then fall back to the slow path which uses `resolveAllLinks`.
This change was tested successfully with links and files on a local mapped disk and on remote shares on macOS and Windows machines.
It might be that falling back to the slow path should be limited to a certain subset of error codes encountered by `GetFinalPathNameByHandle` rather than falling back for all exceptions.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28032#issuecomment-3459213129
More information about the nio-dev
mailing list