mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-11 02:48:35 -04:00
Moved the checks for --ignore-existing and --update higher in
recv_generator() so that they don't trigger erroneously when --link-dest is specified.
This commit is contained in:
26
generator.c
26
generator.c
@@ -801,6 +801,19 @@ static void recv_generator(char *fname, struct file_list *flist,
|
||||
return;
|
||||
}
|
||||
|
||||
if (opt_ignore_existing && statret == 0) {
|
||||
if (verbose > 1)
|
||||
rprintf(FINFO, "%s exists\n", safe_fname(fname));
|
||||
return;
|
||||
}
|
||||
|
||||
if (update_only && statret == 0
|
||||
&& cmp_modtime(st.st_mtime, file->modtime) > 0) {
|
||||
if (verbose > 1)
|
||||
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
|
||||
return;
|
||||
}
|
||||
|
||||
fnamecmp = fname;
|
||||
fnamecmp_type = FNAMECMP_FNAME;
|
||||
|
||||
@@ -910,19 +923,6 @@ static void recv_generator(char *fname, struct file_list *flist,
|
||||
return;
|
||||
}
|
||||
|
||||
if (opt_ignore_existing && fnamecmp_type == FNAMECMP_FNAME) {
|
||||
if (verbose > 1)
|
||||
rprintf(FINFO, "%s exists\n", safe_fname(fname));
|
||||
return;
|
||||
}
|
||||
|
||||
if (update_only && fnamecmp_type == FNAMECMP_FNAME
|
||||
&& cmp_modtime(st.st_mtime, file->modtime) > 0) {
|
||||
if (verbose > 1)
|
||||
rprintf(FINFO, "%s is newer\n", safe_fname(fname));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
|
||||
;
|
||||
else if (fnamecmp_type == FNAMECMP_FUZZY)
|
||||
|
||||
Reference in New Issue
Block a user