From f4e94d9e7dd2352cb566bf54cb6113d5534c1243 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Sun, 29 Jan 2023 11:33:44 -0500 Subject: [PATCH] Fix auto_detect ignoring persistence bool --- backend/src/settings/detect/auto_detect.rs | 1 + backend/src/settings/general.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/settings/detect/auto_detect.rs b/backend/src/settings/detect/auto_detect.rs index a85e6a5..d048b8a 100644 --- a/backend/src/settings/detect/auto_detect.rs +++ b/backend/src/settings/detect/auto_detect.rs @@ -91,6 +91,7 @@ pub fn auto_detect0(settings_opt: Option, json_path: std::path::Pa } if matches { if let Some(settings) = &settings_opt { + *builder.general.persistent() = true; for limit in conf.limits { match limit { Limits::Cpu(cpus) => { diff --git a/backend/src/settings/general.rs b/backend/src/settings/general.rs index 9c6afd7..fc8b68e 100644 --- a/backend/src/settings/general.rs +++ b/backend/src/settings/general.rs @@ -105,7 +105,7 @@ impl Settings { pub fn from_json(other: SettingsJson, json_path: PathBuf) -> Self { match super::Driver::init(other, json_path.clone()) { Ok(x) => { - log::info!("Loaded settings for driver {:?}", x.general.provider()); + log::info!("Loaded settings with drivers general:{:?},cpus:{:?},gpu:{:?},battery:{:?}", x.general.provider(), x.cpus.provider(), x.gpu.provider(), x.battery.provider()); Self { general: x.general, cpus: x.cpus,