mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +03:00
Preserve directory {a,m,c} times by calling copy_times() after the recursion
Otherwise the directory {a,m,c} times will be modified by the recursive copy of the directory tree. Signed-off-by: Ariel Miculas <ariel.miculas@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
3a4a096cd2
commit
ab83e348fb
@ -360,7 +360,6 @@ static void copy_dir(struct copy_fs_state *s,
|
||||
if (dst_inum)
|
||||
*dst_inum = inode.bi_inum;
|
||||
|
||||
copy_times(c, &inode, &stat);
|
||||
copy_xattrs(c, &inode, d->d_name);
|
||||
|
||||
/* copy xattrs */
|
||||
@ -395,6 +394,7 @@ static void copy_dir(struct copy_fs_state *s,
|
||||
BUG();
|
||||
}
|
||||
|
||||
copy_times(c, &inode, &stat);
|
||||
update_inode(c, &inode);
|
||||
next:
|
||||
free(child_path);
|
||||
|
Loading…
Reference in New Issue
Block a user