Ensure that installing files works on non Windows os'es as well

CURA-4222
This commit is contained in:
Jaime van Kessel 2017-08-30 15:06:08 +02:00
parent 679c7dcfda
commit 6d40882bdc

View file

@ -191,6 +191,8 @@ class PluginBrowser(QObject, Extension):
def installPlugin(self, file_path):
if not file_path.startswith("/"):
location = "/" + file_path # Ensure that it starts with a /, as otherwise it doesn't work on windows.
else:
location = file_path
result = PluginRegistry.getInstance().installPlugin("file://" + location)
self._newly_installed_plugin_ids.append(result["id"])