RFR: 8276661: (fs) UserDefinedFileAttributeView no longer works with long path (win) [v4]

Alan Bateman alanb at openjdk.java.net
Wed Dec 1 18:33:26 UTC 2021


On Fri, 19 Nov 2021 17:32:34 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Please consider this change which uses a new method `WindowsPath::getPathWithPrefixForWin32Calls`.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8276661: addPrefixIfNeeded calls addPrefix; remove UNC test

src/java.base/windows/classes/sun/nio/fs/WindowsPath.java line 187:

> 185:         // short absolute paths can be used directly
> 186:         if (isAbsolute() && path.length() <= MAX_PATH)
> 187:             return forceLongPrefix ? addPrefix(path) : path;

Brian and I discussed this issue today and the reason this version didn't work is that it prepends the long path prefix without first using GetFullPathName to resolve the "." and ".." elements in the name. Brian is working on a new version now that will fix this issue and we should end up with a cleaner solution.

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

PR: https://git.openjdk.java.net/jdk/pull/6435


More information about the nio-dev mailing list