{"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 },
-@@ -2159,6 +2169,8 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2221,6 +2231,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;
-@@ -2180,6 +2192,14 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2242,6 +2254,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)
-@@ -2191,6 +2211,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2253,6 +2273,20 @@ int parse_arguments(int *argc_p, const char ***argv_p)
backup_suffix);
return 0;
}
if (backup_dir) {
size_t len;
while (*backup_dir == '.' && backup_dir[1] == '/')
-@@ -2226,6 +2260,34 @@ int parse_arguments(int *argc_p, const char ***argv_p)
+@@ -2288,6 +2322,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 (preserve_times) {
preserve_times = PRESERVE_FILE_TIMES;
-@@ -2667,6 +2729,10 @@ void server_options(char **args, int *argc_p)
+@@ -2729,6 +2791,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) {
-@@ -2675,6 +2741,14 @@ void server_options(char **args, int *argc_p)
+@@ -2737,6 +2803,14 @@ void server_options(char **args, int *argc_p)
goto oom;
args[ac++] = arg;
}