From 5c1cc4a40d84815061d41f1ff5cd4870093c531f Mon Sep 17 00:00:00 2001 From: Borys Jurgiel Date: Wed, 2 Oct 2019 23:29:17 +0200 Subject: [PATCH] [Plugin installer] properly handle zip file names with a dash as a version suffix separator --- python/pyplugin_installer/installer_data.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/pyplugin_installer/installer_data.py b/python/pyplugin_installer/installer_data.py index 2c04973399b..646fa193a70 100644 --- a/python/pyplugin_installer/installer_data.py +++ b/python/pyplugin_installer/installer_data.py @@ -397,7 +397,11 @@ class Repositories(QObject): fileName = pluginNodes.item(i).firstChildElement("file_name").text().strip() if not fileName: fileName = QFileInfo(pluginNodes.item(i).firstChildElement("download_url").text().strip().split("?")[0]).fileName() - name = fileName.partition(".")[0] + match = re.match('(.*?)[.-]', fileName) + if match: + name = match.groups()[0] + else: + name = fileName experimental = False if pluginNodes.item(i).firstChildElement("experimental").text().strip().upper() in ["TRUE", "YES"]: experimental = True