]> git.proxmox.com Git - pve-guest-common.git/commit
fix config_with_pending_array for falsy current values
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 May 2020 15:00:55 +0000 (17:00 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 20 May 2020 15:04:40 +0000 (17:04 +0200)
commit43c899e407d25ef0823403470598a026a0c77ee0
treec75d1ea0fcb9fb7a37b4ab021ba48d83e00b0396
parent4826847217b104def8cbc858cbd42859aa4573da
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>
PVE/GuestHelpers.pm