mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 10:59:01 +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)
|
||||
def updateFirmware(self, file):
|
||||
# the file path could be qurl encoded.
|
||||
if file[:7] == "file://":
|
||||
# the file path could be url-encoded.
|
||||
if file.startswith("file://"):
|
||||
self._firmware_location = QUrl(file).toLocalFile()
|
||||
else:
|
||||
self._firmware_location = file
|
||||
|
Loading…
x
Reference in New Issue
Block a user