-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Plugin Manager does not unload plugins before upgrading them #54968
Comments
@borysiasty do you remember why it was implemented this way? |
Hi Alex! No particular reason, it was just overlooked. I can fix it if you have a reproducible test case / the affected plugin, or do you prefer to fix it by yourself? I guess the best place for unloading is before calling that QDialog: but then the loading back (line 345) should be also performed in lines 323/324, in case the downloading failed or was aborted. And the same problem applies to installing from a local zip: |
This was found when investigating an issue with Mergin plugin updates (MerginMaps/qgis-plugin#504). While in this particular case unloading plugin is not enough, IMHO this is still a valid issue and Plugin Manager should unload plugin before updating it. I will prepare PR. |
After downloading a plugin package, Plugin Manager tries to unzip it and overwrite exiting plugin files without unloading the plugin first, see https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/qgsplugininstallerinstallingdialog.py#L150-L161.
In some cases, when plugin directory contains locked/open files (for example, some resources are open or libraries are loaded) this operation fails on Windows, making it impossible to reinstall/upgrade plugin in a usual way. In that case one has to close QGIS, manually delete plugin folder, then start QGIS again and install plugin.
The text was updated successfully, but these errors were encountered: