diff options
author | Wayne Davison <wayne@opencoder.net> | 2022-08-21 09:56:33 -0700 |
---|---|---|
committer | Wayne Davison <wayne@opencoder.net> | 2022-08-21 10:19:23 -0700 |
commit | 5183c0d6f0bf6786d5e9fa149d0d00f664533441 (patch) | |
tree | b0051e529ce90fc9f89d8040ff63dc71ac340a90 /hlink.c | |
parent | 706bff9176ccf6976e27040eb5729ce34c0058eb (diff) | |
download | rsync-5183c0d6f0bf6786d5e9fa149d0d00f664533441.tar.gz |
Add safety check for local --remove-source-files.
A local_server copy now includes the dev+ino info from the destination
file so that the sender can make sure that it is not going to delete
the destination file. Fixes mistakes such as:
rsync -aiv --remove-source-files dir .
Diffstat (limited to 'hlink.c')
-rw-r--r-- | hlink.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -446,7 +446,7 @@ int hard_link_check(struct file_struct *file, int ndx, char *fname, return -1; if (remove_source_files == 1 && do_xfers) - send_msg_int(MSG_SUCCESS, ndx); + send_msg_success(fname, ndx); return 1; } @@ -519,7 +519,7 @@ void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx, if (val < 0) continue; if (remove_source_files == 1 && do_xfers) - send_msg_int(MSG_SUCCESS, ndx); + send_msg_success(fname, ndx); } if (inc_recurse) { |