RFR: 8355342: File.getCanonicalPath on Java 24 resolves paths on network drives to UNC format [v4]
Brian Burkhalter
bpb at openjdk.org
Wed Sep 17 20:19:45 UTC 2025
On Wed, 17 Sep 2025 17:56:25 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> I assume you've checked the flags that can be provided to GetFinalPathNameByHandleW and that there isn't a solution there.
Yes, I checked all combinations before pursuing this change. There's no help 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
Will check it out.
> 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.
I think it's correct but I agree about its "hackiness."
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27324#issuecomment-3304437884
More information about the core-libs-dev
mailing list