From b6b5ba255019c89cab90cbb8892e6e090d0a2314 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Thu, 28 Feb 2019 12:38:49 +0100 Subject: [PATCH 1/2] Perform lower case comparison of add-on names when updating --- source/gui/addonGui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gui/addonGui.py b/source/gui/addonGui.py index dcaadb7232e..919637d4a73 100644 --- a/source/gui/addonGui.py +++ b/source/gui/addonGui.py @@ -465,7 +465,7 @@ def installAddon(parentWindow, addonPath): prevAddon = None for addon in addonHandler.getAvailableAddons(): - if not addon.isPendingRemove and bundle.name==addon.manifest['name']: + if not addon.isPendingRemove and bundle.name.lower()==addon.manifest['name'].lower(): prevAddon=addon break if prevAddon: From 7be08a503140e64bc7355eac703883f60d119093 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 18 Mar 2019 11:09:36 +0100 Subject: [PATCH 2/2] Do not request removal of a possible previous add-on before it has been replaced by a new version --- source/gui/addonGui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/gui/addonGui.py b/source/gui/addonGui.py index 919637d4a73..b5a8d5db53d 100644 --- a/source/gui/addonGui.py +++ b/source/gui/addonGui.py @@ -496,7 +496,6 @@ def installAddon(parentWindow, addonPath): wx.YES|wx.NO|wx.ICON_WARNING ) != wx.YES: return False - prevAddon.requestRemove() from contextlib import contextmanager @@ -525,6 +524,8 @@ def doneAndDestroy(window): # Use context manager to ensure that `done` and `Destroy` are called on the progress dialog afterwards with doneAndDestroy(progressDialog): gui.ExecAndPump(addonHandler.installAddonBundle, bundle) + if prevAddon: + prevAddon.requestRemove() return True except: log.error("Error installing addon bundle from %s" % addonPath, exc_info=True)