If we update the contents of a symlink and --remove-sent-files
authorWayne Davison <wayned@samba.org>
Sun, 20 Feb 2005 01:04:43 +0000 (01:04 +0000)
committerWayne Davison <wayned@samba.org>
Sun, 20 Feb 2005 01:04:43 +0000 (01:04 +0000)
is enabled, tell the sender about it via MSG_SUCCESS.

generator.c

index f59a512..93a707a 100644 (file)
@@ -42,6 +42,7 @@ extern int preserve_gid;
 extern int preserve_times;
 extern int omit_dir_times;
 extern int delete_during;
+extern int remove_sent_files;
 extern int update_only;
 extern int opt_ignore_existing;
 extern int inplace;
@@ -555,6 +556,11 @@ static void recv_generator(char *fname, struct file_list *flist,
                                rprintf(code, "%s -> %s\n", safe_fname(fname),
                                        safe_fname(file->u.link));
                        }
+                       if (remove_sent_files && !dry_run) {
+                               char numbuf[4];
+                               SIVAL(numbuf, 0, ndx);
+                               send_msg(MSG_SUCCESS, numbuf, 4);
+                       }
                }
 #endif
                return;