cp: don't mishandle existing dir dest permissions (Bug#9170)
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 25 Jul 2011 20:36:16 +0000 (13:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 25 Jul 2011 21:04:51 +0000 (14:04 -0700)
commite772bddde8295fe0fdaef05b3c4c5e967116c805
treeac24ab8d09068a29a9e1e96556b1254013aff8ea
parentf28a09810b7dc11261cb43e2a09726caf9a993b7
cp: don't mishandle existing dir dest permissions (Bug#9170)

* src/copy.c (copy_internal): If we don't create the directory,
then we cannot have omitted permissions.  Problem and trivial
fix reported by Eric Lammerts.
* tests/Makefile.am (TESTS): Add cp/existing-perm-dir.
* tests/cp/existing-perm-dir: New file.
src/copy.c
tests/Makefile.am
tests/cp/existing-perm-dir [new file with mode: 0755]