refactor: remove custom cleanup routine on proton install error #186
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.
Currently, we were extracting the Proton archive directly to
$HOME/.local/share/Steam/compatibilitytools.d
then would clean that directory if the extraction was interrupted. While this process was direct, it required writing a custom cleanup routine to remove the partially extracted files in case an exception occurred. Instead, the launcher will extract to its secure temporary directory created at runtime then move the files to$HOME
like we do with the SLR. Like the previous behavior, when an exception occurs in either the download or installation, the (temporary) directory will be cleaned but by the context manager's cleanup routine. While this would be less direct as it would involve an extra step, it would result in the launcher having to remove less files from the user's home directory and make the Proton installation partially atomic.Additionally, some minor refactoring (e..g, collapsing code blocks) are done for readability.