Files
clash-verge-rev/src-tauri
4adac9e4b6 fix(config): stop rewriting unchanged configs on exit (#8017)
* fix(config): stop rewriting unchanged configs on exit

apply_all_and_save_file() committed the drafts and then saved clash.yaml,
verge.yaml and profiles.yaml unconditionally. With nothing staged that write
replaced each file with content equal to what was already on disk - fields are
encrypted with a fresh nonce, so the bytes differ every time - which reset the
files' creation time on every exit (#7759).

Draft::apply now reports whether it committed a draft, and the exit path saves
only the configs that had one.

* refactor(tests): remove test snippets

Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>

* docs(changelog): add entry of the PR modifications

Assisted-by: Gemini 3.8 Flash Medium (VSCode Copilot Chat)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>

---------

Signed-off-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>
Co-authored-by: sdhfsl <sdhfsl@users.noreply.github.com>
Co-authored-by: ❤是纱雾酱哟~ <49941141+Dragon1573@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-11 17:33:03 +00:00
..
2025-02-27 03:18:23 +08:00
2024-06-20 13:50:28 +08:00