mirror of
git://git.proxmox.com/git/pve-guest-common.git
synced 2025-03-12 20:58:20 +03:00
fix config_with_pending_array for falsy current values
one could have a config with: > acpi: 0 and a pending deletion for that to restore the default 1 value. The config_with_pending_array method then pushed the key twice, one in the loop iterating the config itself correctly and once in the pending delete hash, which is normally only for those options not yet referenced in the config at all. Here the check was on "truthiness" not definedness, fix that. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
4826847217
commit
43c899e407
@ -231,8 +231,8 @@ sub config_with_pending_array {
|
||||
}
|
||||
|
||||
while (my ($opt, $force) = each %$pending_delete_hash) {
|
||||
next if $conf->{pending}->{$opt}; # just to be sure
|
||||
next if $conf->{$opt};
|
||||
next if defined($conf->{pending}->{$opt});
|
||||
next if defined($conf->{$opt});
|
||||
my $item = { key => $opt, delete => ($force ? 2 : 1)};
|
||||
push @$res, $item;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user