mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 20:55:59 +08:00
Fixed plugin installing for windows
CURA-3856
This commit is contained in:
parent
12d8c7f4d7
commit
fc70715cd1
@ -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…
x
Reference in New Issue
Block a user