mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix firmware upload on Windows...
by correctly creating a local path from a url-encoded path Fixes #3731 and #3987
This commit is contained in:
parent
8e6b5a0d6a
commit
7e90546163
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ from cura.PrinterOutput.GenericOutputController import GenericOutputController
|
|||
from .AutoDetectBaudJob import AutoDetectBaudJob
|
||||
from .avr_isp import stk500v2, intelHex
|
||||
|
||||
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty
|
||||
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty, QUrl
|
||||
|
||||
from serial import Serial, SerialException, SerialTimeoutException
|
||||
from threading import Thread, Event
|
||||
|
@ -128,7 +128,7 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||
@pyqtSlot(str)
|
||||
def updateFirmware(self, file):
|
||||
# the file path is qurl encoded.
|
||||
self._firmware_location = file.replace("file://", "")
|
||||
self._firmware_location = QUrl(file).toLocalFile()
|
||||
self.showFirmwareInterface()
|
||||
self.setFirmwareUpdateState(FirmwareUpdateState.updating)
|
||||
self._update_firmware_thread.start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue