From 82e0a433502a66d789ab990085ed11c3b629a85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Sun, 14 Apr 2024 12:39:27 +0200 Subject: [PATCH] fix: bad indent when --indent was != 3 (fixes #19) --- btrfs-list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/btrfs-list b/btrfs-list index c88a924..407e000 100755 --- a/btrfs-list +++ b/btrfs-list @@ -413,7 +413,7 @@ if ($opt_max_name_len > 0 && $opt_max_name_len < 4) { $opt_max_name_len = 4; } -$opt_indent //= 4; +$opt_indent //= 3; if (defined $opt_profile && $opt_profile !~ /^(raid([0156]|1c[34]|10)|single|dup)$/) { print STDERR "FATAL: invalid argument for --profile\n"; @@ -1002,7 +1002,7 @@ sub longest { # loop through all the items foreach my $item (@orderedAll) { - my $len = ($useDepth ? (($item->{depth} || 0) * 3) : 0); + my $len = ($useDepth ? (($item->{depth} || 0) * $opt_indent) : 0); $len += length($item->{$key} || ''); $longest = $len if $len > $longest; }