extern int remove_source_files;
extern int delay_updates;
extern int update_only;
+extern int downdate_only;
extern int remove_source_files;
extern int delay_updates;
extern int update_only;
+extern int downdate_only;
- extern int inplace;
-@@ -1603,6 +1604,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
+@@ -1531,6 +1532,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
goto cleanup;
}
+ if (downdate_only && statret == 0
+ && cmp_time(sx.st.st_mtime, file->modtime) < 0) {
goto cleanup;
}
+ if (downdate_only && statret == 0
+ && cmp_time(sx.st.st_mtime, file->modtime) < 0) {
-@@ -1917,6 +1925,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
- ignore_existing = -ignore_existing;
- ignore_non_existing = -ignore_non_existing;
- update_only = -update_only;
-+ downdate_only = -downdate_only;
- always_checksum = -always_checksum;
- size_only = -size_only;
- append_mode = -append_mode;
-@@ -1942,6 +1951,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
- ignore_existing = -ignore_existing;
- ignore_non_existing = -ignore_non_existing;
- update_only = -update_only;
-+ downdate_only = -downdate_only;
- always_checksum = -always_checksum;
- size_only = -size_only;
- append_mode = -append_mode;
+@@ -1961,6 +1969,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+ ignore_existing = -ignore_existing;
+ ignore_non_existing = -ignore_non_existing;
+ update_only = -update_only;
++ downdate_only = -downdate_only;
+ always_checksum = -always_checksum;
+ size_only = -size_only;
+ append_mode = -append_mode;
+@@ -1986,6 +1995,7 @@ void check_for_finished_files(int itemizing, enum logcode code, int check_redo)
+ ignore_existing = -ignore_existing;
+ ignore_non_existing = -ignore_non_existing;
+ update_only = -update_only;
++ downdate_only = -downdate_only;
+ always_checksum = -always_checksum;
+ size_only = -size_only;
+ append_mode = -append_mode;
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
rprintf(F," --backup-dir=DIR make backups into hierarchy based in DIR\n");
rprintf(F," --suffix=SUFFIX set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
rprintf(F," -u, --update skip files that are newer on the receiver\n");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
rprintf(F," --append-verify like --append, but with old data in file checksum\n");
rprintf(F," --inplace update destination files in-place (SEE MAN PAGE)\n");
rprintf(F," --append append data onto shorter files\n");
rprintf(F," --append-verify like --append, but with old data in file checksum\n");
-@@ -524,6 +526,7 @@ static struct poptOption long_options[] = {
- {"size-only", 0, POPT_ARG_NONE, &size_only, 0, 0, 0 },
- {"one-file-system", 'x', POPT_ARG_NONE, 0, 'x', 0, 0 },
+@@ -892,6 +894,7 @@ static struct poptOption long_options[] = {
+ {"no-one-file-system",'x',POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
+ {"no-x", 'x', POPT_ARG_VAL, &one_file_system, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
+ {"downdate", 'w', POPT_ARG_NONE, &downdate_only, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },
{"update", 'u', POPT_ARG_NONE, &update_only, 0, 0, 0 },
+ {"downdate", 'w', POPT_ARG_NONE, &downdate_only, 0, 0, 0 },
{"existing", 0, POPT_ARG_NONE, &ignore_non_existing, 0, 0, 0 },