char *src_name = file_name_concat (src_name_in, namep, NULL);
char *dst_name = file_name_concat (dst_name_in, namep, NULL);
bool first_dir_created = *first_dir_created_per_command_line_arg;
+ bool rename_succeeded;
ok &= copy_internal (src_name, dst_name, dst_dirfd,
dst_name + (dst_relname_in - dst_name_in),
new_dst, src_sb,
ancestors, &non_command_line_options, false,
&first_dir_created,
- &local_copy_into_self, NULL);
+ &local_copy_into_self, &rename_succeeded);
*copy_into_self |= local_copy_into_self;
free (dst_name);
char *dst_dir; /* Leading directory of DIR. */
idx_t dirlen = dir_len (const_dir);
+ *attr_list = NULL;
+
/* Succeed immediately if the parent of CONST_DIR must already exist,
as the target directory has already been checked. */
if (dirlen <= src_offset)
while (*dst_reldir == '/')
dst_reldir++;
- *attr_list = NULL;
-
/* XXX: If all dirs are present at the destination,
no permissions or security contexts will be updated. */
if (statat (dst_dirfd, dst_reldir, &stats) != 0)