btrbk: print_formatted: fix skip-row-if-empty for --print-schedule

Fix: dont modify "-" %table_formats hash key.

fixes 716d420a40 btrbk: print_formatted: add skip-row-if-empty functionality for table_formats
pull/293/head
Axel Burri 2019-08-06 17:29:45 +02:00
parent 3ea7746700
commit 4845bc6691
1 changed files with 3 additions and 2 deletions

5
btrbk
View File

@ -4681,8 +4681,9 @@ sub print_formatted(@)
my @keys; my @keys;
my %print_row; my %print_row;
foreach (@$key_defs) { foreach (@$key_defs) {
$print_row{$_} = 1 unless(s/^-//); # strip leading "-" my $kd = $_;
push @keys, $_; $print_row{$kd} = 1 unless($kd =~ s/^-//); # strip leading "-"
push @keys, $kd;
} }
if($format eq "raw") if($format eq "raw")