Skip to content

fix(store): never save over a document that can't be read - #328

Merged
enricobuehler merged 1 commit into
mainfrom
fix/store-unreadable
Nov 15, 2026
Merged

enricobuehler merged 1 commit into
mainfrom
fix/store-unreadable

Conversation

@enricobuehler

Copy link
Copy Markdown
Member

Follows the shared client store (core 27437ea9e), as client-ps5 #20 did.

  • A settings.json that exists but can't be read stays where it is. The app runs on defaults and saves nothing until a load reads it. Before, it was renamed to settings.json.bad and defaults replaced it, so a passing read error dropped every pairing.
  • A client key or certificate that exists but can't be read is an error. Before, a new identity replaced it and every host needed pairing again.
  • A document that does not parse is still renamed to settings.json.bad.

The core pin stays at 28c312102. The next core draws the Game picture mode row for webOS, and the code behind it is #319, so the bump lands with that PR.

Checked on the Mac: cargo test (45 pass, two new), cargo clippy --all-targets -- -D warnings, cargo fmt --all --check. Not checked: nothing ran on a TV.

A settings document that existed but failed to read was renamed aside
and replaced by defaults: one bad read dropped every pairing until
someone restored the file by hand. A client key or certificate that
failed to read was replaced by a new identity, so every host needed
pairing again.

A document that can't be read now stays where it is, and nothing is
saved until a load reads it. An unreadable key or certificate is an
error, so the pair every host pinned stays. One that does not parse is
still kept as `settings.json.bad`. This follows the shared client store.
@enricobuehler
enricobuehler merged commit 02e8461 into main Nov 15, 2026
@enricobuehler
enricobuehler deleted the fix/store-unreadable branch November 15, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant