mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:15:54 +08:00
Simplify detection of url-encoded filepatch
This commit is contained in:
parent
65ada30c9c
commit
846c55a99d
@ -127,8 +127,8 @@ class USBPrinterOutputDevice(PrinterOutputDevice):
|
|||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def updateFirmware(self, file):
|
def updateFirmware(self, file):
|
||||||
# the file path could be qurl encoded.
|
# the file path could be url-encoded.
|
||||||
if file[:7] == "file://":
|
if file.startswith("file://"):
|
||||||
self._firmware_location = QUrl(file).toLocalFile()
|
self._firmware_location = QUrl(file).toLocalFile()
|
||||||
else:
|
else:
|
||||||
self._firmware_location = file
|
self._firmware_location = file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user