RFR: 8355342: File.getCanonicalPath on Java 24 resolves paths on network drives to UNC format [v4]
Alan Bateman
alanb at openjdk.org
Wed Sep 17 17:58:44 UTC 2025
On Wed, 17 Sep 2025 15:12:01 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> I had actually already been wondering whether the canonicalized path should be checked for links before invoking `getFinalPath`.
I assume you've checked the flags that can be provided to GetFinalPathNameByHandleW and that there isn't a solution there. In that case, I think it would be better to check the attributes in the WIN32_FIND_DATA to see if it's a reparse point. That would mean deeper changes but should mean you avoid the post-processing the result from getFinalPath, which I think is a bit too hacky to have in this code.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27324#issuecomment-3304025676
More information about the core-libs-dev
mailing list