20 fixes: mutex poisoning recovery, clickthrough shutdown, audio cleanup, config corruption, GIF aspect ratio, ffmpeg crash detection, cancel export, discard confirm, thumbnail cache, keyboard nav, right-click tracking, multi-monitor overlay, click injection fix, update script robustness, effect cleanup, concat guard, dead code removal

This commit is contained in:
2026-05-27 19:14:33 +03:00
parent f0775b8ff0
commit e4141f8be8
10 changed files with 310 additions and 140 deletions
+12 -1
View File
@@ -136,7 +136,18 @@ impl Config {
return Ok(cfg);
}
let raw = std::fs::read_to_string(path)?;
Ok(toml::from_str(&raw)?)
match toml::from_str::<Self>(&raw) {
Ok(cfg) => Ok(cfg),
Err(e) => {
// Config is corrupt - back it up and return defaults
tracing::warn!("config.toml is corrupt ({e}), backing up and using defaults");
let backup = path.with_extension("toml.bak");
let _ = std::fs::copy(path, &backup);
let cfg = Self::default();
cfg.save(path)?;
Ok(cfg)
}
}
}
pub fn save(&self, path: &Path) -> Result<()> {