copy: Merge copy_directory() and copy_directory_fd() into copy_directory_at()
Let's merge these two into a single function that can handle both variants and more.
This commit is contained in:
@@ -1299,7 +1299,7 @@ static int prepare_ns(const char *process_name) {
|
||||
|
||||
/* Copy unit files to make them accessible even when unprivileged. */
|
||||
assert_se(get_testdata_dir("test-execute/", &unit_dir) >= 0);
|
||||
assert_se(copy_directory(unit_dir, PRIVATE_UNIT_DIR, COPY_MERGE_EMPTY) >= 0);
|
||||
assert_se(copy_directory_at(AT_FDCWD, unit_dir, AT_FDCWD, PRIVATE_UNIT_DIR, COPY_MERGE_EMPTY) >= 0);
|
||||
|
||||
/* Prepare credstore like tmpfiles.d/credstore.conf for LoadCredential= tests. */
|
||||
FOREACH_STRING(p, "/run/credstore", "/run/credstore.encrypted") {
|
||||
|
||||
Reference in New Issue
Block a user