RFR: 8073061: (fs) Files.copy(foo, bar, REPLACE_EXISTING) deletes bar even if foo is not readable [v3]
Brian Burkhalter
bpb at openjdk.org
Thu Sep 7 16:31:43 UTC 2023
On Thu, 7 Sep 2023 16:25:46 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> I will investigate the mode.
>
>> I will investigate the mode.
>
> Okay. The change to copy looks okay, as does the change to the helper for cross-provider copy/move, it's just the move in the Unix provider where I can't say for sure without doing some experiments.
The `W_OK` is not needed here as you suggested. With only `R_OK` being set, the proposed patch does not delete the existing target, but the mainline does.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15501#discussion_r1318862197
More information about the nio-dev
mailing list