(fs) Files.createDirectory fails if the resolved path is exactly 248 characters long

Alan Bateman Alan.Bateman at oracle.com
Fri May 10 02:39:06 PDT 2013


On 09/05/2013 19:19, Kurchi Hazra wrote:
> Hi Alan,
>
>    This looks good to me, I had a question though. In the new test, 
> while testing directory creation, why do
> you test till MIN_PATH+1 and not till MIN_PATH?
>
> - Kurchi
Thanks for looking at it. I'm not sure that I get your comment about 
MIN_PATH. The tests exercises createDirectory on directory names from 
MIN_PATH to min(max, 255) in an attempt to cover the range around 248 
for the full (absolute) path. There will be corner cases where the 
working directory/path is very long in which case the full path will 
always be >248. I can reduce the MIN_PATH down to something very small 
to improve the chances.

-Alan.


More information about the nio-dev mailing list