RFR: 8298478: (fs) Path.of should allow input to include long path prefix

Alan Bateman alanb at openjdk.org
Sat Feb 4 07:56:48 UTC 2023


On Sat, 4 Feb 2023 00:03:26 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Remove the long path `\?` or `\?\UNC` prefix before creating the `WindowsPath` instance..

I think there is a bit more to this, what would we expect from `Path.of("\\\?\")` for example? I think the eventual solution will strip the prefix, parse the remainder, and then check the result path type with the prefix. For example, if the resulting path type is relative then it should be rejected. If the prefix is `\\\?\` and the parsed remaining is a UNC then maybe it should be rejected? So I think there is a bit more to this can just stripping the prefix.

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

PR: https://git.openjdk.org/jdk/pull/12423


More information about the nio-dev mailing list