Bernhard Voelker wrote: > On 08/07/2012 12:59 PM, Ondrej Oprala wrote: >> Hi, >> here's the new patch. Everything should be in order now.
> As the new variable "explicit_no_preserve" is only used for > the mode, I find its name is a bit confusing (because it's > too general). Good point. Ondřej, please add a comment before the declaration of the new member, named explicit_no_preserve_mode, I suppose. > Furthermore (and more important), the bug is not yet fixed > for directories: > > $ mkdir d > $ chmod 705 d > $ touch d/x > $ chmod 405 d/x > $ src/cp --no-preserve=mode -r d d2 > $ find d d2 -ls > 15335447 4 drwx---r-x 2 berny users 4096 Aug 7 13:28 d > 15335450 0 -r-----r-x 1 berny users 0 Aug 7 13:28 d/x > 15335458 4 drwx---r-x 2 berny users 4096 Aug 7 13:28 d2 > 15335471 0 -rw-r--r-- 1 berny users 0 Aug 7 13:28 d2/x > > The mode of d2 should be 755. Good catch. Thanks!