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;
int statret, stat_errno;
char *fnamecmp, *partialptr, *backupptr = NULL;
char fnamecmpbuf[MAXPATHLEN];
- int itemizing, maybe_DEL_TERSE, maybe_PERMS_REPORT;
+ int itemizing, maybe_PERMS_REPORT;
uchar fnamecmp_type;
enum logcode code;
if (protocol_version >= 29) {
itemizing = 1;
code = daemon_log_format_has_i ? 0 : FLOG;
- maybe_DEL_TERSE = log_format_has_o_or_i ? 0 : DEL_TERSE;
maybe_PERMS_REPORT = log_format_has_i ? 0 : PERMS_REPORT;
} else if (am_daemon) {
itemizing = daemon_log_format_has_i && !dry_run;
code = itemizing || dry_run ? FCLIENT : FINFO;
- maybe_DEL_TERSE = DEL_TERSE;
maybe_PERMS_REPORT = PERMS_REPORT;
} else if (!am_server) {
itemizing = log_format_has_i;
code = itemizing ? 0 : FINFO;
- maybe_DEL_TERSE = log_format_has_o_or_i ? 0 : DEL_TERSE;
maybe_PERMS_REPORT = log_format_has_i ? 0 : PERMS_REPORT;
} else {
itemizing = 0;
code = FINFO;
- maybe_DEL_TERSE = DEL_TERSE;
maybe_PERMS_REPORT = PERMS_REPORT;
}
* we need to delete it. If it doesn't exist, then
* (perhaps recursively) create it. */
if (statret == 0 && !S_ISDIR(st.st_mode)) {
- delete_file(fname, st.st_mode, maybe_DEL_TERSE);
+ delete_file(fname, st.st_mode, DEL_TERSE);
statret = -1;
}
if (dry_run && statret != 0 && missing_below < 0) {
if (S_ISLNK(st.st_mode))
delete_file(fname, st.st_mode, DEL_TERSE);
else {
- delete_file(fname, st.st_mode, maybe_DEL_TERSE);
+ delete_file(fname, st.st_mode, DEL_TERSE);
statret = -1;
}
}
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;
if (IS_DEVICE(st.st_mode))
delete_file(fname, st.st_mode, DEL_TERSE);
else {
- delete_file(fname, st.st_mode, maybe_DEL_TERSE);
+ delete_file(fname, st.st_mode, DEL_TERSE);
statret = -1;
}
if (verbose > 2) {
}
if (statret == 0 && !S_ISREG(st.st_mode)) {
- if (delete_file(fname, st.st_mode, maybe_DEL_TERSE) != 0)
+ if (delete_file(fname, st.st_mode, DEL_TERSE) != 0)
return;
statret = -1;
stat_errno = ENOENT;
#endif
}
*lb = len;
- write_buf(f_out_name, lenbuf, lb - lenbuf + 1);
+ write_buf(f_out_name, (char*)lenbuf, lb - lenbuf + 1);
write_buf(f_out_name, fuzzy_file->basename, len);
}
}
}
if (verbose >= 2) {
- rprintf(FINFO,
+ rprintf(FINFO, "delta-transmission %s\n",
whole_file > 0
- ? "delta-transmission disabled for local transfer or --whole-file\n"
- : "delta transmission enabled\n");
+ ? "disabled for local transfer or --whole-file"
+ : "enabled");
}
/* We expect to just sit around now, so don't exit on a timeout.