int delete_before = 0;
int delete_after = 0;
int delete_excluded = 0;
-int remove_sender_files = 0;
+int remove_source_files = 0;
int one_file_system = 0;
int protocol_version = PROTOCOL_VERSION;
int sparse_files = 0;
rprintf(F," -H, --hard-links preserve hard links\n");
rprintf(F," -p, --perms preserve permissions\n");
rprintf(F," -E, --executability preserve the file's executability\n");
- rprintf(F," --chmod=CHMOD change destination permissions\n");
+ rprintf(F," --chmod=CHMOD affect file and/or directory permissions\n");
rprintf(F," -o, --owner preserve owner (super-user only)\n");
rprintf(F," -g, --group preserve group\n");
rprintf(F," --devices preserve device files (super-user only)\n");
rprintf(F," --rsync-path=PROGRAM specify the rsync to run on the remote machine\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-sender-files sender removes synchronized files (non-dirs)\n");
+ rprintf(F," --remove-source-files sender removes synchronized files (non-dirs)\n");
rprintf(F," --del an alias for --delete-during\n");
rprintf(F," --delete delete extraneous files from destination dirs\n");
rprintf(F," --delete-before receiver deletes before transfer (default)\n");
{"delete-during", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 },
{"delete-after", 0, POPT_ARG_NONE, &delete_after, 0, 0, 0 },
{"delete-excluded", 0, POPT_ARG_NONE, &delete_excluded, 0, 0, 0 },
- {"remove-sent-files",0, POPT_ARG_VAL, &remove_sender_files, 2, 0, 0 }, /* deprecated */
- {"remove-sender-files",0,POPT_ARG_VAL, &remove_sender_files, 1, 0, 0 },
+ {"remove-sent-files",0, POPT_ARG_VAL, &remove_source_files, 2, 0, 0 }, /* deprecated */
+ {"remove-source-files",0,POPT_ARG_VAL, &remove_source_files, 1, 0, 0 },
{"force", 0, POPT_ARG_NONE, &force_delete, 0, 0, 0 },
{"ignore-errors", 0, POPT_ARG_NONE, &ignore_errors, 0, 0, 0 },
{"max-delete", 0, POPT_ARG_INT, &max_delete, 0, 0, 0 },
return 0;
}
- if (remove_sender_files) {
- /* We only want to infer this refusal of --remove-sender-files
+ if (remove_source_files) {
+ /* We only want to infer this refusal of --remove-source-files
* via the refusal of "delete", not any of the "delete-FOO"
* options. */
if (refused_delete && am_sender) {
if (fuzzy_basis && am_sender)
args[ac++] = "--fuzzy";
- if (remove_sender_files == 1)
- args[ac++] = "--remove-sender-files";
- else if (remove_sender_files)
+ if (remove_source_files == 1)
+ args[ac++] = "--remove-source-files";
+ else if (remove_source_files)
args[ac++] = "--remove-sent-files";
*argc = ac;
{
char *p;
int not_host;
+ int hostlen;
if (port_ptr && strncasecmp(URL_PREFIX, s, strlen(URL_PREFIX)) == 0) {
char *path;
- int hostlen;
s += strlen(URL_PREFIX);
if ((p = strchr(s, '/')) != NULL) {
hostlen = p - s;
if (*s == '[' && (p = strchr(s, ']')) != NULL && p[1] == ':') {
s++;
+ hostlen = p - s;
*p = '\0';
not_host = strchr(s, '/') || !strchr(s, ':');
*p = ']';
} else {
if (!(p = strchr(s, ':')))
return NULL;
+ hostlen = p - s;
*p = '\0';
not_host = strchr(s, '/') != NULL;
*p = ':';
return NULL;
}
- *host_ptr = new_array(char, p - s + 1);
- strlcpy(*host_ptr, s, p - s + 1);
+ *host_ptr = new_array(char, hostlen + 1);
+ strlcpy(*host_ptr, s, hostlen + 1);
if (p[1] == ':') {
if (port_ptr && !*port_ptr)