Repository navigation
Refresh a pushed game's releases from the project the catalog lists - #590
Open
thehobbit85 wants to merge 1 commit into
Open
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
A push for a game refreshed the releases of the project it was installed from. The update check reads the project the catalog lists now, so for a project that moved, the push refreshed the wrong list and a new release stayed hidden until the six-hour copy ran out. The push now asks the same project the update check reads.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Found while auditing #78 and #177.
When the website pushes that a game has a new release, the launcher refreshes that game's release list past the usual six-hour copy, then checks for updates. The push refreshed the project the game was installed from (
g.repo). The update check reads the project the catalog lists now (listed_repo). For a game whose project moved, such as to its own Forgejo server, the push refreshed the old project's list. The update check then read the new project's cached copy, so the new release stayed hidden until that copy was six hours old or the player checked by hand.The push now refreshes the project the catalog lists, through the same
listed_repothe update check uses. A game the catalog lists no project for keeps its own, as before.Limits: this only matters for games whose catalog project differs from the one they were installed from.
How you tested it
Run on macOS against
eaf7ca2, with a synthetic catalog on disk.New test: a game installed from
old/projthat the catalog lists asnew/proj. Onmainthe push askedold/proj; with this change it asksnew/proj.Control test: a game the catalog lists no project for still uses its own.
Rust: 1,217 passed, 1 ignored. UI: 1,019 passed, 11 skipped.
git diff --checkclean.npm testpassesnode --test tests/*.test.cjspassesTried it in the launcher (
npm run dev)Checklist
recomplauncher.json