{"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 },
-@@ -1215,6 +1225,8 @@ int parse_arguments(int *argc, const cha
- partial_dir = sanitize_path(NULL, partial_dir, NULL, 0, NULL);
- if (backup_dir)
+@@ -1219,6 +1229,10 @@ int parse_arguments(int *argc, const cha
backup_dir = sanitize_path(NULL, backup_dir, NULL, 0, NULL);
-+ if (backup_dir_dels)
+ die_on_unsafe_path(backup_dir, 0);
+ }
++ if (backup_dir_dels) {
+ backup_dir_dels = sanitize_path(NULL, backup_dir_dels, NULL, 0, NULL);
++ die_on_unsafe_path(backup_dir_dels, 0);
++ }
}
if (server_filter_list.head && !am_sender) {
struct filter_list_struct *elp = &server_filter_list;
-@@ -1241,6 +1253,14 @@ int parse_arguments(int *argc, const cha
+@@ -1240,6 +1254,14 @@ int parse_arguments(int *argc, const cha
return 0;
}
}
}
if (!backup_suffix)
-@@ -1252,6 +1272,16 @@ int parse_arguments(int *argc, const cha
+@@ -1251,6 +1273,16 @@ int parse_arguments(int *argc, const cha
backup_suffix);
return 0;
}
if (backup_dir) {
backup_dir_len = strlcpy(backup_dir_buf, backup_dir, sizeof backup_dir_buf);
backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len;
-@@ -1275,6 +1305,31 @@ int parse_arguments(int *argc, const cha
+@@ -1274,6 +1306,31 @@ int parse_arguments(int *argc, const cha
"P *%s", backup_suffix);
parse_rule(&filter_list, backup_dir_buf, 0, 0);
}
if (make_backups && !backup_dir)
omit_dir_times = 1;
-@@ -1619,6 +1674,10 @@ void server_options(char **args,int *arg
+@@ -1618,6 +1675,10 @@ void server_options(char **args,int *arg
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) {
-@@ -1627,7 +1686,13 @@ void server_options(char **args,int *arg
+@@ -1626,7 +1687,13 @@ void server_options(char **args,int *arg
goto oom;
args[ac++] = arg;
}