mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 09:05:53 +08:00
Fix flashing "default" firmware
The url is not QUrl encoded if the "default" firmware is flashed
This commit is contained in:
parent
7e90546163
commit
65ada30c9c
@ -127,8 +127,11 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
||||
|
||||
@pyqtSlot(str)
|
||||
def updateFirmware(self, file):
|
||||
# the file path is qurl encoded.
|
||||
self._firmware_location = QUrl(file).toLocalFile()
|
||||
# the file path could be qurl encoded.
|
||||
if file[:7] == "file://":
|
||||
self._firmware_location = QUrl(file).toLocalFile()
|
||||
else:
|
||||
self._firmware_location = file
|
||||
self.showFirmwareInterface()
|
||||
self.setFirmwareUpdateState(FirmwareUpdateState.updating)
|
||||
self._update_firmware_thread.start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user