mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-28 13:58:08 +00:00
restore default value of 0 for remove/maxfiles
If neither the 'remove' option of vzdump nor the 'maxfiles' option in
the storage config are set, assume a value of 0, i.e. do not delete
anything and allow unlimited backups.
Restores previous behaviour that was broken in e6946086e3
.
Also fixes a warning about using '== 0' on a non-number type.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
parent
6a073b92e9
commit
b64dd8c8a5
@ -474,7 +474,7 @@ sub new {
|
||||
|
||||
if (!defined($opts->{'prune-backups'}) && !defined($opts->{maxfiles})) {
|
||||
$opts->{'prune-backups'} = $info->{'prune-backups'};
|
||||
$opts->{maxfiles} = $info->{maxfiles};
|
||||
$opts->{maxfiles} = $info->{maxfiles} // 0;
|
||||
if ($opts->{maxfiles} == 0) {
|
||||
# zero means keep all, so avoid triggering any remove code path to be safe
|
||||
$opts->{remove} = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user