(fs) Files.createDirectory fails if the resolved path is exactly 248 characters long
Chris Hegarty
chris.hegarty at oracle.com
Fri May 10 06:01:50 PDT 2013
The changes look ok to me.
-Chris.
On 09/05/2013 18:01, Alan Bateman wrote:
>
> This is a corner case on Windows with Files.createDirectory. If the path
> to the directory, when resolved against the current directory, is
> exactly 248 characters then the method fails because we have pre-pended
> the long path prefix. The implementation is okay for <248 and >248, it's
> just the 248 case that isn't handled correctly.
>
> The fix is trivial, the addPrefixIfNeded method needs to add the long
> path prefix when the resolved path is >= 248, not >248 as it was doing.
> The webrev with the changes is here:
>
> http://cr.openjdk.java.net/~alanb/8011128/webrev/
>
> -Alan.
>
More information about the nio-dev
mailing list