refactor: restore runtime depending on directory integrity #217
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.
Creates a checksum file
umu.hashsum
in$HOME/.local/share/umu
or$HOME/.var/app/org.openwinecomponents.umu.umu-launcher/data/umu
that stores the sha256 checksum of all the runtime files metadata. The file will be used each launch to automatically restore the runtime if the runtime directory is either tampered, corrupted, or if the checksum file itself is missing.Note: Once this is merged, this will delete all users
$HOME/.local/share/umu
or$HOME/.var/app/org.openwinecomponents.umu.umu-launcher/data/umu
directory and restore the runtime back to a clean state with the checksum file.Expecting this to fix both current Lutris and Heroic users who are experiencing problems with missing files after installing or updating the runtime.
Tested on Lutris 0.5.17 with its runtime update. Additionally, a branch is made at https://github.com/Open-Wine-Components/umu-launcher/tree/integrity-check for testing.