RFR: 8273922: (fs) UserDefinedFileAttributeView doesn't handle file names that are just under the MAX_PATH limit (win) [v3]

Alan Bateman alanb at openjdk.java.net
Wed Sep 22 13:28:58 UTC 2021


On Tue, 21 Sep 2021 19:28:58 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> Modify `sun.nio.fs.WindowsUserDefinedFileAttributeView.join(WindowsPath,String)` to handle file names which exceed the limit.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8273922: Make join() reject absolute path in 1nth in 'name' parameter

src/java.base/windows/classes/sun/nio/fs/WindowsUserDefinedFileAttributeView.java line 64:

> 62:         String path = join(file.getPathForWin32Calls(), name);
> 63:         WindowsPath wp = WindowsPath.createFromNormalizedPath(wfs, path);
> 64:         return wp.getPathForWin32Calls();

I think we can simplify this to avoid most of the conversions, I'll get back to you soon with a proposal for this.

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

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


More information about the nio-dev mailing list