From fbd91cae0cadf80229b41ee58394a046974c878c Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 2 Sep 2007 06:25:26 +0000 Subject: [PATCH] One more tweak to latest omit-dir-times code. --- options.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/options.c b/options.c index 241d075b..77cbe10e 100644 --- a/options.c +++ b/options.c @@ -1397,9 +1397,6 @@ int parse_arguments(int *argc, const char ***argv, int frommain) } } - if (omit_dir_times && preserve_times > 1) - preserve_times = 1; - if (!backup_suffix) backup_suffix = backup_dir ? "" : BACKUP_SUFFIX; backup_suffix_len = strlen(backup_suffix); @@ -1432,8 +1429,15 @@ int parse_arguments(int *argc, const char ***argv, int frommain) "P *%s", backup_suffix); parse_rule(&filter_list, backup_dir_buf, 0, 0); } - if (make_backups && !backup_dir && preserve_times > 1) - preserve_times = 1; + + if (make_backups && !backup_dir) { + omit_dir_times = 0; /* Implied, so avoid -O to sender. */ + if (preserve_times > 1) + preserve_times = 1; + } else if (omit_dir_times) { + if (preserve_times > 1) + preserve_times = 1; + } if (stdout_format) { if (am_server && log_format_has(stdout_format, 'I')) -- 2.34.1