btrbk: fix "config print" command (undefined value in format_preserve_matrix())

regression: 5791d72171 btrbk: add "preserve_hour_of_day" configuration option
pull/274/head
Axel Burri 2018-12-05 21:43:54 +01:00
parent de851955b6
commit ff011d55af
1 changed files with 2 additions and 2 deletions

4
btrbk
View File

@ -3278,7 +3278,7 @@ sub config_dump_keys($;@)
foreach(@valary) {
if(defined($_)) {
if($config_options{$key}->{accept_preserve_matrix}) {
$_ = format_preserve_matrix($_);
$_ = format_preserve_matrix($_, format => "config");
}
}
$_ //= exists($config->{$key}) ? "no" : "<unset>";
@ -4113,7 +4113,7 @@ sub format_preserve_matrix($@)
$val = '*' if($val eq 'all');
$s .= ($s ? ' ' : '') . $val . $_;
}
if($preserve->{d} || $preserve->{w} || $preserve->{m} || $preserve->{y}) {
if(($format ne "config") && ($preserve->{d} || $preserve->{w} || $preserve->{m} || $preserve->{y})) {
$s .= " ($preserve->{dow}, " . sprintf("%02u:00", $preserve->{hod}) . ")";
}
}