summaryrefslogtreecommitdiff
path: root/hlink.c
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2022-08-21 09:56:33 -0700
committerWayne Davison <wayne@opencoder.net>2022-08-21 10:19:23 -0700
commit5183c0d6f0bf6786d5e9fa149d0d00f664533441 (patch)
treeb0051e529ce90fc9f89d8040ff63dc71ac340a90 /hlink.c
parent706bff9176ccf6976e27040eb5729ce34c0058eb (diff)
downloadrsync-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hlink.c b/hlink.c
index 66810a3e..7602ec38 100644
--- a/hlink.c
+++ b/hlink.c
@@ -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) {