split options by : instead of ; and skip empty options

This commit is contained in:
Sebastian Moser
2024-10-10 18:14:34 +02:00
parent 8f6c054753
commit 6942266b3e

View File

@@ -298,7 +298,11 @@ fn config_from_string(config_string: String) -> MizeResult<ItemData> {
let mut config = ItemData::new(); let mut config = ItemData::new();
for option in config_string.split(";") { for option in config_string.split(":") {
if option == "".to_owned() {
continue;
}
let path = option.split("=").nth(0) let path = option.split("=").nth(0)
.ok_or(MizeError::new().msg(format!("Failed to parse Option: option '{}' has an empty path (thing beforee =)", option)))?; .ok_or(MizeError::new().msg(format!("Failed to parse Option: option '{}' has an empty path (thing beforee =)", option)))?;
let value = option.split("=").nth(1) let value = option.split("=").nth(1)