From 6942266b3e7aa30e236635d99b9baf49f25b02d0 Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Thu, 10 Oct 2024 18:14:34 +0200 Subject: [PATCH] split options by : instead of ; and skip empty options --- src/platform/os/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platform/os/mod.rs b/src/platform/os/mod.rs index d104754..99f7fc8 100644 --- a/src/platform/os/mod.rs +++ b/src/platform/os/mod.rs @@ -298,7 +298,11 @@ fn config_from_string(config_string: String) -> MizeResult { 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) .ok_or(MizeError::new().msg(format!("Failed to parse Option: option '{}' has an empty path (thing beforee =)", option)))?; let value = option.split("=").nth(1)