cleanup keep-all handling
If keep-all is set to 0, adding it doesn't make a difference, if the key is not in the hash, it won't show up in the 'values'. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
7806065d78
commit
a76885903c
@ -737,10 +737,7 @@ sub exec_backup_task {
|
||||
my $prune_options = $opts->{'prune-backups'};
|
||||
|
||||
my $backup_limit = 0;
|
||||
my $keep_all = delete $prune_options->{'keep-all'};
|
||||
if ($keep_all) {
|
||||
$prune_options = { 'keep-all' => 1 };
|
||||
} else {
|
||||
if (!$prune_options->{'keep-all'}) {
|
||||
foreach my $keep (values %{$prune_options}) {
|
||||
$backup_limit += $keep;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user