Preserve F1 settings when a save fails #2256
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2256"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ThePerfomance on 2026-11-29T11:06:18Z.
What it changes
F1 currently truncates the destination before writing the new settings, treats any read failure as an empty file, and reports a successful reset even if deleting the file failed.
Stage the full contents in a uniquely named sibling temporary file, sync it, and replace the settings file only after that succeeds. An unreadable existing file is preserved. Reset still succeeds when the file is already absent and reports other errors in the menu.
How it was tested
git diff --checkpassed.victory-formats. This PR does not touch that crate, its inputs, or workspace dependencies.Checked for overlap
mainand open PRs touching the menu. #1382 includes overlapping persistence and reset changes as part of the native Graphics menu. #1981 also moves F1 persistence into a shared backend. This PR offers the standalone one-file fix for the existing F1 menu, with regression tests for the failure paths.