copy: Copy symlink xattrs

Symlinks can have xattrs as well, let's make sure we copy those
as well.
This commit is contained in:
Daan De Meyer
2023-02-14 12:51:40 +01:00
parent c17cfe6ef7
commit da486c30fe
+1
View File
@@ -504,6 +504,7 @@ static int fd_copy_symlink(
AT_SYMLINK_NOFOLLOW) < 0)
r = -errno;
(void) copy_xattr(df, from, dt, to, copy_flags);
(void) utimensat(dt, to, (struct timespec[]) { st->st_atim, st->st_mtim }, AT_SYMLINK_NOFOLLOW);
return r;
}