Subject: bug#40353: cp -a --attributes-only zeroes a file with more than one link

From: Matt Kloss <[email-masked]>
Date: Tue, 31 Mar 2020 15:40:40 +0200

31.03.2020, 14:32, "Matt Kloss" <[email-masked]>:

foo has a size of 0 bytes!

The user thinks he's replicating timestamp and permissions, and he's actually deleting data. (Well, the data is still in foo2, but...)

To be clear, when doing cp -a --attributes-only aaa foo (linked to foo2), the behaviour I expect is that foo and foo2 still point to the same inode as before, of course with their content unchanged, and that the attributes of both links now match those of aaa—like when you "chmod" or "touch" a link.