Pádraig Brady wrote:
This is a little surprising as cp didn't create /destination/dir in this case.
However if it did create that dir, then the mode would be expected.
So cp is keeping the destination consistent whether it previously existed or 
not.

Sorry, but I am not following this analysis. The --no-preserve=mode option says "do not copy the mode of the source to the destination", and yet cp is copying the mode of the source to the destination. How is that not a bug?

A longer analysis: the documentation for --preserve says what should happen in the absence of the --preserve option (namely, that permissions of existing destinations are unchanged), and --no-preserve=mode is pretty clearly equivalent to the absence of --preserve=mode.

So I don't see how the current behavior can be considered to match the documentation. I don't see how it'd be that useful, either.



Reply via email to