]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp: ensure --attributes-only doesn't remove files
authorPádraig Brady <P@draigBrady.com>
Wed, 1 Apr 2020 11:51:34 +0000 (12:51 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 2 Apr 2020 14:44:55 +0000 (15:44 +0100)
commit7b5f0fa47cd04c84975250d5b5da7c98e097e99f
tree89360ca15a1808ef3f0d2568ec46f17c2d34fdad
parent271b21704570c8ca1ddd1ef6a40561c3b2469dd6
cp: ensure --attributes-only doesn't remove files

* src/copy.c (copy_internal): Ensure we don't unlink the destination
unless explicitly requested.
* tests/cp/attr-existing.sh: Add test cases.
* NEWS: Mention the bug fix.
Fixes https://bugs.gnu.org/40352
NEWS
src/copy.c
tests/cp/attr-existing.sh