proxmox/proxmox-section-config
Fiona Ebner cb2646c7b4 section config: fix handling array schema in unknown sections
Mostly relevant when the config is written out again after parsing it
with unknown sections. Previously, with duplicate keys, only the last
value would be saved. Now, duplicate keys are assumed to be part of
an array schema and handled as such.

Because the unknown section parsing does not know if a certain
property does actually have an array schema, it's not possible to
detect duplicate keys for non-array-schema properties, and if a
property with array-schema shows up only once, it will not be saved as
a Value::Array, but a Value::String.

Writing, or to be precise the format_section_content methods, already
handle Value::Array, so don't need to be adapted.

Fixes: 0cd0d16 ("section config: support allowing unknown section types")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
2022-12-12 14:03:26 +01:00
..
debian update d/control files 2022-12-07 09:48:47 +01:00
src section config: fix handling array schema in unknown sections 2022-12-12 14:03:26 +01:00
Cargo.toml define workspace dependencies in workspace 2022-12-07 09:48:38 +01:00