On Wed, 17 Sep 2025 00:32:37 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> `File.getCanonicalPath` invokes `GetFinalPathNameByHandle` on the result of 
>> `canonicalize0` which causes the drive letter of a mapped drive to be 
>> converted to a UNC prefix. If such a substitution is detected, this request 
>> proposes to revert the conversion of drive letter to UNC prefix before 
>> returning the canonical path.
>
> Brian Burkhalter has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8355342: Corrected a comment

In `toRealPath`, the function `GetFinalPathNameByHandle` is not invoked unless 
links are being followed and a reparse point is encountered. Otherwise the real 
path is built up by analyzing the input path. I had actually already been 
wondering whether the canonicalized path should be checked for links before 
invoking `getFinalPath`.

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

PR Comment: https://git.openjdk.org/jdk/pull/27324#issuecomment-3303469478

Reply via email to