mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Fixed plugin installing for windows
CURA-3856
This commit is contained in:
parent
12d8c7f4d7
commit
fc70715cd1
1 changed files with 4 additions and 2 deletions
|
@ -102,8 +102,10 @@ class PluginBrowser(QObject, Extension):
|
||||||
self._download_plugin_reply.downloadProgress.disconnect(self._onDownloadPluginProgress)
|
self._download_plugin_reply.downloadProgress.disconnect(self._onDownloadPluginProgress)
|
||||||
self._temp_plugin_file = tempfile.NamedTemporaryFile(suffix = ".curaplugin")
|
self._temp_plugin_file = tempfile.NamedTemporaryFile(suffix = ".curaplugin")
|
||||||
self._temp_plugin_file.write(self._download_plugin_reply.readAll())
|
self._temp_plugin_file.write(self._download_plugin_reply.readAll())
|
||||||
|
location = self._temp_plugin_file.name
|
||||||
result = PluginRegistry.getInstance().installPlugin("file://" + self._temp_plugin_file.name)
|
if not location.startswith("/"):
|
||||||
|
location = "/" + location # Ensure that it starts with a /, as otherwise it doesn't work on windows.
|
||||||
|
result = PluginRegistry.getInstance().installPlugin("file://" + location)
|
||||||
|
|
||||||
self._newly_installed_plugin_ids.append(result["id"])
|
self._newly_installed_plugin_ids.append(result["id"])
|
||||||
self.pluginsMetadataChanged.emit()
|
self.pluginsMetadataChanged.emit()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue