From 4845bc66915d86a45747f5f15233a5baa533c329 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Tue, 6 Aug 2019 17:29:45 +0200 Subject: [PATCH] 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 --- btrbk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/btrbk b/btrbk index ab5f4c6..40f1f0c 100755 --- a/btrbk +++ b/btrbk @@ -4681,8 +4681,9 @@ sub print_formatted(@) my @keys; my %print_row; foreach (@$key_defs) { - $print_row{$_} = 1 unless(s/^-//); # strip leading "-" - push @keys, $_; + my $kd = $_; + $print_row{$kd} = 1 unless($kd =~ s/^-//); # strip leading "-" + push @keys, $kd; } if($format eq "raw")