fix(settings): an unreadable settings.json is kept as settings.json.broken, and the home says so #170
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!170
Loading…
Reference in a new issue
No description provided.
Delete branch "madebyjordan/LongshotLauncher:fix/settings-broken-kept"
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?
A corrupt
settings.jsonloaded as defaults with no word, and the next save overwrote it: the player's builds folder, build-files folder and kept folders were gone, and with a custom builds folder the save gather then looked in the wrong place.builds.jsonalready handles this;settings.jsonnow does the same.What changes
LauncherSettings.Load: an unreadable file (bad JSON, empty,null) is copied byte for byte tosettings.json.broken, the defaults load, and the reason goes in a newProblemfield that is never saved. It copies rather than renames on purpose: the settings load twice at start (App.axaml.cs, thenLauncherService), and a rename would leave nothing for the second load to report.prepareShaders) still loads with no notice and no.brokenfile; the existing check now also requires that.Testing
Windows 11, .NET SDK 10.0.404.
python -I tests/test_launcher_core.py: the check commit fails on main withAn unreadable settings.json is kept as settings.json.broken, byte for byte., and passes with the fix. Checks: the.brokencopy has the same bytes and the next save leaves it alone; missing is not broken; empty andnullare broken, as builds.json treats them.Not tested: the notice in the window.
🤖 Generated with Claude Code
e67de287679ec6040c56