mirror of https://github.com/digint/btrbk
btrbk: allow compressors to not have a compression level
This commit assumes that a negative `level_min`-value, which would never really make sense as it would result in an option `--#`, means that the compression tool does not support any level options at all. A negative `level_max`-value would in principle still allow to have no upper limmit, and is therefore not checked for. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>pull/501/head
parent
af2d7b2c99
commit
1cd7a48a47
4
btrbk
4
btrbk
|
@ -727,7 +727,9 @@ sub compress_cmd_text($;$)
|
||||||
WARN_ONCE "Compression level capped to maximum for '$cc->{name}': $cc->{level_max}";
|
WARN_ONCE "Compression level capped to maximum for '$cc->{name}': $cc->{level_max}";
|
||||||
$level = $cc->{level_max};
|
$level = $cc->{level_max};
|
||||||
}
|
}
|
||||||
push @cmd, '-' . $level;
|
if($cc->{level_min} >= 0) {
|
||||||
|
push @cmd, '-' . $level;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(defined($def->{threads}) && ($def->{threads} ne "default")) {
|
if(defined($def->{threads}) && ($def->{threads} ne "default")) {
|
||||||
my $thread_opt = $cc->{threads};
|
my $thread_opt = $cc->{threads};
|
||||||
|
|
Loading…
Reference in New Issue