RFR: 8287843: File::getCanonicalFile doesn't work for \?\C:\ style paths DOS device paths [v3]
Alan Bateman
alanb at openjdk.org
Wed Sep 20 19:08:39 UTC 2023
On Wed, 20 Sep 2023 18:47:33 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> > File::isAbsolute, it looks like it will return true for input like `\\\?\\foo` but it will be treated by toAbsolutePath as a relative path.
>
> Right on:
Ideally the prefix would be removed at the front door, meaning when creating the File object, but it may be 20 years too late to do that change. From a compatibility perspective then limiting the it to canonicalization should be okay but it the path needs to make absolute again after stripping.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15603#issuecomment-1728282600
More information about the core-libs-dev
mailing list