Skip to content
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

Merged
merged 3 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions source/addonHandler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def _getAvailableAddonsFromPath(
log.debug("Listing add-ons from %s", path)
for p in os.listdir(path):
if p.endswith(DELETEDIR_SUFFIX):
if isFirstLoad:
if isFirstLoad and NVDAState.shouldWriteToDisk():
removeFailedDeletion(os.path.join(path, p))
continue
addon_path = os.path.join(path, p)
Expand All @@ -351,6 +351,7 @@ def _getAvailableAddonsFromPath(
name = a.manifest["name"]
if (
isFirstLoad
and NVDAState.shouldWriteToDisk()
and name in state[AddonStateCategory.PENDING_REMOVE]
and not a.path.endswith(ADDON_PENDINGINSTALL_SUFFIX)
):
Expand All @@ -360,9 +361,13 @@ def _getAvailableAddonsFromPath(
except RuntimeError:
log.exception(f"Failed to remove {name} add-on")
_failedPendingRemovals.add(name)
if isFirstLoad and (
name in state[AddonStateCategory.PENDING_INSTALL]
or a.path.endswith(ADDON_PENDINGINSTALL_SUFFIX)
if (
isFirstLoad
and NVDAState.shouldWriteToDisk()
and (
name in state[AddonStateCategory.PENDING_INSTALL]
or a.path.endswith(ADDON_PENDINGINSTALL_SUFFIX)
)
):
newPath = a.completeInstall()
if newPath:
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The available options are:
* Improvements in Microsoft PowerPoint: (#17004)
* It is now possible to use braille display routing keys to move the text cursor. (#9101)
* It is now possible to use the review cursor selection commands to select text.
* Updating NVDA while add-on updates are pending no longer results in the add-on being removed. (#16837)

### Changes for Developers

Expand Down