Skip to content

Commit

Permalink
fix: bad indent when --indent was != 3 (fixes #19)
Browse files Browse the repository at this point in the history
  • Loading branch information
speed47 committed Apr 14, 2024
1 parent 99a6cfd commit 82e0a43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions btrfs-list
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 82e0a43

Please sign in to comment.