mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-30 00:29:39 -05:00
Prevent installation of ZIP plugins if they don't have the root folder Fixes #30063
This commit is contained in:
parent
d40d04c40e
commit
6456b7912c
@ -555,6 +555,10 @@ class QgsPluginInstaller(QObject):
|
||||
|
||||
pluginFileName = os.path.splitext(os.path.basename(filePath))[0]
|
||||
|
||||
if not pluginName:
|
||||
QMessageBox.warning(iface.mainWindow(), self.tr("QGIS Python Install from ZIP Plugin Installer"), self.tr('The plugin directory was not found inside the ZIP file. You should create a plugin folder, put the files inside and create the ZIP file again.'), QMessageBox.Ok)
|
||||
return
|
||||
|
||||
pluginsDirectory = qgis.utils.home_plugin_path
|
||||
if not QDir(pluginsDirectory).exists():
|
||||
QDir().mkpath(pluginsDirectory)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user