RFR: 8368165: (fs) Path.toRealPath does not perform correctly for symbolic links in a mapped drive (win)
Alan Bateman
alanb at openjdk.org
Thu Oct 30 08:14:40 UTC 2025
On Wed, 29 Oct 2025 21:20:51 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> I don't think the current behavior is incorrect, but it does not provide the sought for outcome. The fallback path using `resolveAllLinks` appears to find the desired answer in these cases where ` GetFinalPathNameByHandle` itself fails.
We can't fallback unconditionally when GetFinalPathNameByHandle fails. The only reason for this fallback path is for cases where there is a sym link to something that we know doesn't support links. So this is why it is limited to ERROR_INVALID_LEVEL, and even then it is dubious and maybe we need to explore the errors and interop issues further before seeing if anything should be done.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28032#issuecomment-3466570757
More information about the nio-dev
mailing list