diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-09 13:45:16 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-10 18:08:07 +0200 |
commit | 1fd5ec5697680e2ec6277431bd74cabf48dbc94f (patch) | |
tree | 1ab4c985f91268a8b3693be809f307989dc9cd5c /src | |
parent | e57b7020d2ee89d9c906bcefa091d31b067dedcc (diff) | |
download | systemd-1fd5ec5697680e2ec6277431bd74cabf48dbc94f.tar.gz |
tmpfiles: Add merge support for copy files action
If '+' is specified with 'C', let's merge the tree with any existing
tree.
Diffstat (limited to 'src')
-rw-r--r-- | src/tmpfiles/tmpfiles.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index de72df2908..382fa8b56a 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -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); |