What is the bug or the crash?
If a plugin is getting upgraded, and any existing file from the plugin's directory is write-protected, the upgrade will fail half-way through, leaving the plugin in a broken state with some files from the old version and other files from the new version.
This is because right now, the installer does the following steps:
- extract ZIP package to the existing plugin directory - this is just a test whether the ZIP is not broken
- remove the existing plugin directory
- extract ZIP package again, to the now clean plugin directory
If the step 1 fails (due to a write-protected file), then the whole upgrade will fail and leave the plugin files in broken state.
https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/qgsplugininstallerinstallingdialog.py#L196
Steps to reproduce the issue
- set a file in a plugin that can be upgraded to write protected
- try to upgrade that plugin
Versions
All QGIS versions
Supported QGIS version
New profile
Additional context
No response
What is the bug or the crash?
If a plugin is getting upgraded, and any existing file from the plugin's directory is write-protected, the upgrade will fail half-way through, leaving the plugin in a broken state with some files from the old version and other files from the new version.
This is because right now, the installer does the following steps:
If the step 1 fails (due to a write-protected file), then the whole upgrade will fail and leave the plugin files in broken state.
https://github.com/qgis/QGIS/blob/master/python/pyplugin_installer/qgsplugininstallerinstallingdialog.py#L196
Steps to reproduce the issue
Versions
All QGIS versions
Supported QGIS version
New profile
Additional context
No response