./configure (optional if already run)
make
-based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
+based-on: a01e3b490eb36ccf9e704840e1b6683dab867550
diff --git a/backup.c b/backup.c
--- a/backup.c
+++ b/backup.c
{"list-only", 0, POPT_ARG_VAL, &list_only, 2, 0, 0 },
{"read-batch", 0, POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
{"write-batch", 0, POPT_ARG_STRING, &batch_name, OPT_WRITE_BATCH, 0, 0 },
-@@ -1991,6 +2001,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2006,6 +2016,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
tmpdir = sanitize_path(NULL, tmpdir, NULL, 0, SP_DEFAULT);
if (backup_dir)
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, SP_DEFAULT);
}
if (daemon_filter_list.head && !am_sender) {
filter_rule_list *elp = &daemon_filter_list;
-@@ -2012,6 +2024,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2027,6 +2039,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
if (check_filter(elp, FLOG, dir, 1) < 0)
goto options_rejected;
}
}
if (!backup_suffix)
-@@ -2023,6 +2043,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2038,6 +2058,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
backup_suffix);
return 0;
}
if (backup_dir) {
while (*backup_dir == '.' && backup_dir[1] == '/')
backup_dir += 2;
-@@ -2056,6 +2090,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2071,6 +2105,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
"P *%s", backup_suffix);
parse_filter_str(&filter_list, backup_dir_buf, rule_template(0), 0);
}
if (make_backups && !backup_dir) {
omit_dir_times = 0; /* Implied, so avoid -O to sender. */
-@@ -2469,6 +2531,10 @@ void server_options(char **args, int *argc_p)
+@@ -2484,6 +2546,10 @@ void server_options(char **args, int *argc_p)
args[ac++] = "--backup-dir";
args[ac++] = backup_dir;
}
/* Only send --suffix if it specifies a non-default value. */
if (strcmp(backup_suffix, backup_dir ? "" : BACKUP_SUFFIX) != 0) {
-@@ -2477,7 +2543,14 @@ void server_options(char **args, int *argc_p)
+@@ -2492,7 +2558,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}