rprintf(F," -B, --block-size=SIZE force a fixed checksum block-size\n");
rprintf(F," -e, --rsh=COMMAND specify the remote shell to use\n");
rprintf(F," --rsync-path=PROGRAM specify the rsync to run on the remote machine\n");
- rprintf(F," --existing ignore non-existing files on receiving side\n");
- rprintf(F," --ignore-existing ignore files that already exist on receiving side\n");
- rprintf(F," --remove-sent-files sent files/symlinks are removed from sending side\n");
+ rprintf(F," --existing skip creating new files on receiver\n");
+ rprintf(F," --ignore-existing skip updating files that already exist on receiver\n");
+ rprintf(F," --remove-sent-files sender removes successfully sent files (non-dirs)\n");
rprintf(F," --del an alias for --delete-during\n");
- rprintf(F," --delete delete files that don't exist on the sending side\n");
+ rprintf(F," --delete delete extraneous files from destination dirs\n");
rprintf(F," --delete-before receiver deletes before transfer (default)\n");
rprintf(F," --delete-during receiver deletes during transfer, not before\n");
rprintf(F," --delete-after receiver deletes after transfer, not before\n");
- rprintf(F," --delete-excluded also delete excluded files on the receiving side\n");
+ rprintf(F," --delete-excluded also delete excluded files from destination dirs\n");
rprintf(F," --ignore-errors delete even if there are I/O errors\n");
rprintf(F," --force force deletion of directories even if not empty\n");
rprintf(F," --max-delete=NUM don't delete more than NUM files\n");
case OPT_EXCLUDE_FROM:
case OPT_INCLUDE_FROM:
arg = poptGetOptArg(pc);
- if (sanitize_paths)
+ if (sanitize_paths) {
arg = sanitize_path(NULL, arg, NULL, 0, NULL);
+ die_on_unsafe_path((char*)arg, 0);
+ }
if (server_filter_list.head) {
char *cp = strdup(arg);
if (!cp)
break;
case OPT_LINK_DEST:
-#ifdef HAVE_LINK
+#ifdef SUPPORT_HARD_LINKS
link_dest = 1;
dest_option = "--link-dest";
goto set_dest_dir;
int i;
for (i = *argc; i-- > 0; )
(*argv)[i] = sanitize_path(NULL, (*argv)[i], "", 0, NULL);
- if (tmpdir)
+ if (tmpdir) {
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, NULL);
- if (partial_dir)
- partial_dir = sanitize_path(NULL, partial_dir, NULL, 0, NULL);
- if (backup_dir)
+ die_on_unsafe_path(tmpdir, 0);
+ }
+ if (backup_dir) {
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL);
+ die_on_unsafe_path(backup_dir, 0);
+ }
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
if (check_filter(elp, tmpdir, 1) < 0)
goto options_rejected;
}
- if (partial_dir && *partial_dir) {
- clean_fname(partial_dir, 1);
- if (check_filter(elp, partial_dir, 1) < 0)
- goto options_rejected;
- }
if (backup_dir) {
if (!*backup_dir)
goto options_rejected;