RFR: 8276661: (fs) UserDefinedFileAttributeView no longer works with long path (win) [v2]
Alan Bateman
alanb at openjdk.java.net
Thu Nov 18 08:36:48 UTC 2021
On Thu, 18 Nov 2021 04:28:48 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> src/java.base/windows/classes/sun/nio/fs/WindowsPath.java line 313:
>>
>>> 311: if (!path.startsWith("\\\\")) {
>>> 312: path = "\\\\?\\" + path;
>>> 313: }
>>
>> I think the approach looks okay but I wonder if we need to handle the UNC case here.
>
> Addressed in commit 01.
It would be a lot simpler to just add "addPrefix" that unconditionally adds the prefix. There should be no scenario where double translation happens, if it does then there's a bug and I'm concerned that addPrefixIfAbsent will mask it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6435
More information about the nio-dev
mailing list