-
-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not complete add-on installation or removal from the launcher #17024
Conversation
…lete addon installation or removal
WalkthroughThe recent changes enhance NVDA's add-on handling during updates. Specifically, they modify the loading logic to ensure that add-ons are only removed or installed when the system can safely write to disk. This prevents data loss during updates, allowing users to maintain their installed add-ons while ensuring a smoother upgrade process. Changes
Assessment against linked issues
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really clean approach, nice work!
Co-authored-by: Sean Budd <[email protected]>
Link to issue number:
Fixes #16837
Summary of the issue:
As reported by @CyrilleB79, if one were to update an add-on from the add-on store, then accept an NVDA update before restarting to complete the add-on update, the update will completely clobber the add-on. Upon further investigation, this is because the launcher erroneously attempts to complete add-on installation/removal, but an error is thrown (because it shouldn't be touching the file system) part way through, so it cannot complete successfully.
Description of user facing changes
If add-ons are pending installation/removal when an update is started, the installation will not affect this, and the installation/removal will proceed when the updated copy of NVDA starts.
Description of development approach
Added checks for
NVDAState.shouldWriteToDisk()
to sections ofaddonHandler._getAvailableAddonsFromPath
that alter the filesystem.Testing strategy:
Spoofed an old add-on. Updated via the store. Triggered NVDA to update. Ensured the add-on was updated when the new version started.
Known issues with pull request:
The launcher will log an error about add-ons not being found, but all add-ons still seem to work properly.
Code Review Checklist:
Summary by CodeRabbit
New Features
Bug Fixes