fix(cosmic-theme): copy for backup, not rename

We're now merging the colors with kdeglobals, not replacing it with a symlink. So renaming the file gives us a missing file Io error:
 [2026-02-18T20:03:08Z ERROR cosmic_settings_daemon::theme] Failed to apply COSMIC theme exports. Io(Os { code: 2, kind: NotFound, message: "No such file or directory" })
This commit is contained in:
Adil Hanney 2026-02-18 20:10:42 +00:00 committed by Michael Murphy
parent dc3c194f09
commit 3ed5c173fd

View file

@ -338,7 +338,7 @@ widgetStyle=qt6ct-style
fn backup_non_cosmic_kdeglobals(ini: &Ini, path: &Path) -> io::Result<()> {
if !Self::is_cosmic_kdeglobals(&ini)?.unwrap_or(true) {
let backup_path = path.with_extension("bak");
fs::rename(path, &backup_path)?;
fs::copy(path, &backup_path)?;
}
Ok(())
}