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:
Wayne Davison
2005-03-03 01:33:51 +00:00
parent a1d23b5314
commit c3cbcfb8ef

View File

@@ -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)