extern int remove_sent_files;
extern int delay_updates;
extern int update_only;
-extern int opt_ignore_existing;
+extern int ignore_existing;
+extern int ignore_non_existing;
extern int inplace;
extern int append_mode;
extern int make_backups;
extern int whole_file;
extern int list_only;
extern int read_batch;
-extern int only_existing;
extern int orig_umask;
extern int safe_symlinks;
extern long block_size; /* "long" because popt can't set an int32. */
stat_errno = errno;
}
- if (only_existing && statret == -1 && stat_errno == ENOENT) {
- /* we only want to update existing files */
+ if (ignore_non_existing && statret == -1 && stat_errno == ENOENT) {
if (verbose > 1) {
rprintf(FINFO, "not creating new %s \"%s\"\n",
S_ISDIR(file->mode) ? "directory" : "file",
return;
}
- if (opt_ignore_existing && statret == 0) {
+ if (ignore_existing && statret == 0) {
if (verbose > 1)
rprintf(FINFO, "%s exists\n", safe_fname(fname));
return;
int lull_mod = allowed_lull * 5;
int need_retouch_dir_times = preserve_times && !omit_dir_times;
int need_retouch_dir_perms = 0;
- int save_only_existing = only_existing;
- int save_opt_ignore_existing = opt_ignore_existing;
+ int save_ignore_existing = ignore_existing;
+ int save_ignore_non_existing = ignore_non_existing;
int save_do_progress = do_progress;
int save_make_backups = make_backups;
phase++;
csum_length = SUM_LENGTH;
- only_existing = max_size = opt_ignore_existing = 0;
+ max_size = ignore_existing = ignore_non_existing = 0;
update_only = always_checksum = size_only = 0;
ignore_times = 1;
if (append_mode) /* resend w/o append mode */
}
phase++;
- only_existing = save_only_existing;
- opt_ignore_existing = save_opt_ignore_existing;
+ ignore_non_existing = save_ignore_non_existing;
+ ignore_existing = save_ignore_existing;
make_backups = save_make_backups;
if (verbose > 2)
int bwlimit = 0;
int fuzzy_basis = 0;
size_t bwlimit_writemax = 0;
-int only_existing = 0;
-int opt_ignore_existing = 0;
+int ignore_existing = 0;
+int ignore_non_existing = 0;
int need_messages_from_generator = 0;
int max_delete = 0;
OFF_T max_size = 0;
{"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
{"one-file-system", 'x', POPT_ARG_NONE, &one_file_system, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
- {"existing", 0, POPT_ARG_NONE, &only_existing, 0, 0, 0 },
- {"ignore-existing", 0, POPT_ARG_NONE, &opt_ignore_existing, 0, 0, 0 },
+ {"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
+ {"ignore-existing", 0, POPT_ARG_NONE, &ignore_existing, 0, 0, 0 },
+ {"ignore-non-existing",0,POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"max-size", 0, POPT_ARG_STRING, &max_size_arg, OPT_MAX_SIZE, 0, 0 },
{"sparse", 'S', POPT_ARG_NONE, &sparse_files, 0, 0, 0 },
{"inplace", 0, POPT_ARG_NONE, &inplace, 0, 0, 0 },
if (numeric_ids)
args[ac++] = "--numeric-ids";
- if (only_existing && am_sender)
- args[ac++] = "--existing";
-
- if (opt_ignore_existing && am_sender)
+ if (ignore_existing && am_sender)
args[ac++] = "--ignore-existing";
+ /* Backward compatibility: send --existing, not --ignore-non-existing. */
+ if (ignore_non_existing && am_sender)
+ args[ac++] = "--existing";
+
if (append_mode)
args[ac++] = "--append";
else if (inplace)