[9] RFC on 8073061: Files.copy(foo, bar, REPLACE_EXISTING) deletes bar even if foo is not readable

Francis Galiegue fgaliegue at gmail.com
Wed Feb 18 07:30:48 UTC 2015


On Wed, Feb 18, 2015 at 7:56 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
[...]
>>
> copy & move are complicated as it requires dealing with many different file
> types, sym links, etc. For the regular file case and when overwriting an
> existing file then it needs to truncate the existing file rather than
> deleting it (that is what this bug is about).
>

Hold on. Are we talking about the same thing?

If the source file cannot be read, the destination should be left UNTOUCHED.

-- 
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa


More information about the nio-dev mailing list