extern int io_timeout;
extern int remote_version;
extern int always_checksum;
+extern int modify_window;
+extern char *compare_dest;
/* choose whether to skip a particular file */
of the file time to determine whether to sync */
if (always_checksum && S_ISREG(st->st_mode)) {
char sum[MD4_SUM_LENGTH];
+ char fnamecmpdest[MAXPATHLEN];
+
+ if (compare_dest != NULL) {
+ if (access(fname, 0) != 0) {
+ slprintf(fnamecmpdest,MAXPATHLEN,"%s/%s",
+ compare_dest,fname);
+ fname = fnamecmpdest;
+ }
+ }
file_checksum(fname,sum,st->st_size);
if (remote_version < 21) {
return (memcmp(sum,file->sum,2) == 0);
return 0;
}
- return (st->st_mtime == file->modtime);
+ return (cmp_modtime(st->st_mtime,file->modtime) == 0);
}
return;
}
}
+ delete_file(fname);
}
- delete_file(fname);
if (do_symlink(file->link,fname) != 0) {
rprintf(FERROR,"symlink %s -> %s : %s\n",
fname,file->link,strerror(errno));
return;
}
- if (update_only && st.st_mtime > file->modtime && fnamecmp == fname) {
+ if (update_only && cmp_modtime(st.st_mtime,file->modtime)>0 && fnamecmp == fname) {
if (verbose > 1)
rprintf(FINFO,"%s is newer\n",fname);
return;