]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
copy: do not ignore chattr_flags and friends passed to copy_file_atomic_full()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 8 Feb 2024 06:59:48 +0000 (15:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 8 Feb 2024 13:06:16 +0000 (22:06 +0900)
Fixes a bug introduced by 427d9c34e61a8f5bfe369f1d5a0426143fe5741e.

src/shared/copy.h

index 4e4eb74986a0f585a3bbcd7aface1f5c02cd52bb..d842edd2c8a88208c2ca525ab03af43d92ccce95 100644 (file)
@@ -70,7 +70,7 @@ static inline int copy_file_atomic_at(int dir_fdf, const char *from, int dir_fdt
         return copy_file_atomic_at_full(dir_fdf, from, dir_fdt, to, mode, 0, 0, copy_flags, NULL, NULL);
 }
 static inline int copy_file_atomic_full(const char *from, const char *to, mode_t mode, unsigned chattr_flags, unsigned chattr_mask, CopyFlags copy_flags, copy_progress_bytes_t progress, void *userdata) {
-        return copy_file_atomic_at_full(AT_FDCWD, from, AT_FDCWD, to, mode, 0, 0, copy_flags, NULL, NULL);
+        return copy_file_atomic_at_full(AT_FDCWD, from, AT_FDCWD, to, mode, chattr_flags, chattr_mask, copy_flags, progress, userdata);
 }
 static inline int copy_file_atomic(const char *from, const char *to, mode_t mode, CopyFlags copy_flags) {
         return copy_file_atomic_full(from, to, mode, 0, 0, copy_flags, NULL, NULL);