RFR: 8368165: (fs) Path.toRealPath does not perform correctly for symbolic links in a mapped drive (win) [v2]

Brian Burkhalter bpb at openjdk.org
Wed Nov 5 02:03:54 UTC 2025


On Wed, 5 Nov 2025 01:01:12 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`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8368165: Improve fallback mechanism when a link cannot be opened for attribute access

Commit 891561f, versus the mainline, changes getRealPath to fall back to resolveAllLinks if:

1. the reparse point encountered can be opened with the FILE_FLAG_OPEN_REPARSE_POINT flag set even though it could not be opened without this flag set; or
2. GetFinalPathNameByHandle converted a drive path to a UNC path.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28032#issuecomment-3488802095


More information about the nio-dev mailing list