./configure (optional if already run)
make
-based-on: 3b8f8192227b14e708bf535072485e50f4362270
+based-on: 24079e988fc31af4eba56cd2701fdc5a4154980d
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 },
-@@ -1972,6 +1982,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -1991,6 +2001,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;
-@@ -1993,6 +2005,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2012,6 +2024,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)
-@@ -2004,6 +2024,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2023,6 +2043,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;
-@@ -2037,6 +2071,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2056,6 +2090,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. */
-@@ -2450,6 +2512,10 @@ void server_options(char **args, int *argc_p)
+@@ -2469,6 +2531,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) {
-@@ -2458,7 +2524,14 @@ void server_options(char **args, int *argc_p)
+@@ -2477,7 +2543,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}