You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Problem in pantry when section name contains space #292
In cook server mode when you have pantry.conf with sections name containing space like ["Garage Freezer"] (seems to be valid refering toTOML v1.0.0)
then the actions Add Item, Remove item or Edit item corrupt thr pantry.conf file : the double quotes are removes from the names these sections.
(Note that for items whose name contain a space, this works correctly)
Looking at cookcli\src\server\handlers\pantry.rs
in function fn serialize_pantry_to_regular_toml() :
line 380 writeln!(&mut output, "[{section_name}]").unwrap();
should be replaced by writeln!(&mut output, "[{}]", toml_escape_key(section_name)).unwrap();
Same update may also be made to cookcli\src\pantry.rs in function fn serialize_pantry_to_toml() line 32
Activity
fix: quote pantry section names containing spaces in TOML output