mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 05:39:02 +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._temp_plugin_file = tempfile.NamedTemporaryFile(suffix = ".curaplugin")
|
||||
self._temp_plugin_file.write(self._download_plugin_reply.readAll())
|
||||
|
||||
result = PluginRegistry.getInstance().installPlugin("file://" + self._temp_plugin_file.name)
|
||||
location = 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.pluginsMetadataChanged.emit()
|
||||
|
Loading…
x
Reference in New Issue
Block a user