[9] RFC on 8073061: Files.copy(foo, bar, REPLACE_EXISTING) deletes bar even if foo is not readable
Alan Bateman
Alan.Bateman at oracle.com
Wed Feb 18 09:21:00 UTC 2015
On 18/02/2015 09:05, Francis Galiegue wrote:
> :
> OK, so, in this matrix of test cases, what is supposed to happen when:
>
> * the destination is a regular file on which you have write access,
> * the source is a regular file on which you DO NOT have read access?
>
> My hope: leave the destination alone. Am I right?
>
That's right. The bug that we have now is that we assume that the source
is readable when its attributes can be read. There is a similar issue on
Windows although it's more difficult to create that scenario. And to be
clear, it is not a security issue, the permission checks are correct for
the case that you are running with a security manager.
-Alan
More information about the nio-dev
mailing list