RFR: 8287843: File::getCanonicalFile doesn't work for \?\C:\ style paths DOS device paths [v2]

Alan Bateman alanb at openjdk.org
Fri Sep 8 10:03:40 UTC 2023


On Fri, 8 Sep 2023 01:07:17 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> In the Windows implementation of java.io.File.getCanonicalPath, strip any long path or UNC prefix before canonicalizing the remainder of the pathname.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8287843: Handle "\\?\UNC"; add bad paths to test

The two cases that I'm wondering about are `\?` and `\?\UNC`.

For `\?` it looks like it will throw (you've got a test for that. I'm just wondering if there is input today where getParent().getCanonicalPath() would succeed today and fail wit hate change.

For `\?\UNC` it looks it will be converted by the new code to `` so the root directory of the current volume, do I have that right? I'm trying to see how this case fails in the badPaths list.

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

PR Comment: https://git.openjdk.org/jdk/pull/15603#issuecomment-1711407110


More information about the core-libs-dev mailing list