Skip to content

Commit

Permalink
CLEANUP: Also don't die on logging
Browse files Browse the repository at this point in the history
  • Loading branch information
magicaldave committed Dec 14, 2024
1 parent 93c4267 commit fe1d8d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit fe1d8d5

Please sign in to comment.