tmpfiles: Add merge support for copy files action

If '+' is specified with 'C', let's merge the tree with any existing
tree.
This commit is contained in:
Daan De Meyer
2023-05-10 18:08:07 +02:00
parent e57b7020d2
commit 1fd5ec5697
3 changed files with 26 additions and 10 deletions
+1 -1
View File
@@ -1803,7 +1803,7 @@ static int copy_files(Item *i) {
dfd, bn,
i->uid_set ? i->uid : UID_INVALID,
i->gid_set ? i->gid : GID_INVALID,
COPY_REFLINK | COPY_MERGE_EMPTY | COPY_MAC_CREATE | COPY_HARDLINKS,
COPY_REFLINK | ((i->append_or_force) ? COPY_MERGE : COPY_MERGE_EMPTY) | COPY_MAC_CREATE | COPY_HARDLINKS,
NULL);
fd = openat(dfd, bn, O_NOFOLLOW|O_CLOEXEC|O_PATH);