From fe1d8d5e2307a5c8756afdf71f88c3d28294f889 Mon Sep 17 00:00:00 2001 From: Dave Corley Date: Sat, 14 Dec 2024 14:35:24 -0700 Subject: [PATCH] CLEANUP: Also don't die on logging --- src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1a0adc9..5d92be2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -363,7 +363,13 @@ fn main() -> Result<()> { } if light_config.save_log { - let path: PathBuf = Path::new(&openmw_config_path()).join(LOG_NAME); + let config_path = absolute_path_to_openmw_cfg() + .parent() + .expect("Unable to get config path parent!") + .to_string_lossy() + .to_string(); + + let path: PathBuf = Path::new(&config_path).join(LOG_NAME); let mut file = File::create(path)?; let _ = write!(file, "{}", format!("{:#?}", &generated_plugin)); }