mirror of
https://git.proxmox.com/git/pve-common
synced 2025-06-12 00:33:29 +00:00
SectionConfig: always write out explicitly set booleans
Because when only writing the ones which are true we're breaking the ones which default to true (like the mkdir option on directory storages, where we need a false value to be written out explicitly).
This commit is contained in:
parent
e7cc4f9a97
commit
d152f8b0ee
@ -400,7 +400,8 @@ my $format_config_line = sub {
|
||||
if ($key =~ m/[\n\r]/) || ($value =~ m/[\n\r]/);
|
||||
|
||||
if ($ct eq 'boolean') {
|
||||
return $value ? "\t$key\n" : '';
|
||||
return "\t$key " . ($value ? 1 : 0) . "\n"
|
||||
if defined($value);
|
||||
} else {
|
||||
return "\t$key $value\n" if "$value" ne '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user