TEST(copy_tree) {
_cleanup_hashmap_free_ Hashmap *denylist = NULL;
_cleanup_free_ char *cp = NULL;
- char original_dir[] = "/tmp/test-copy_tree/";
+ char path_original_dir[] = "/tmp/test-copy_tree/";
+ _cleanup_free_ char *original_dir = NULL;
char copy_dir[] = "/tmp/test-copy_tree-copy/";
char **files = STRV_MAKE("file", "dir1/file", "dir1/dir2/file", "dir1/dir2/dir3/dir4/dir5/file");
char **symlinks = STRV_MAKE("link", "file",
int xattr_worked = -1; /* xattr support is optional in temporary directories, hence use it if we can,
* but don't fail if we can't */
+ assert_se(chase(path_original_dir, NULL, CHASE_NONEXISTENT, &original_dir, NULL) >= 1);
+ assert_se(strextend(&original_dir, "/", NULL));
+
(void) rm_rf(copy_dir, REMOVE_ROOT|REMOVE_PHYSICAL);
(void) rm_rf(original_dir, REMOVE_ROOT|REMOVE_PHYSICAL);