mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix uploading custom firmware on windows
The simple string replacement left an extraneous "/" in front of the path, which Windows can't handle. QUrl.toLocalFile() does a proper conversion. CURA-955
This commit is contained in:
parent
dc01cdbc88
commit
fc6e92e10f
1 changed files with 2 additions and 1 deletions
|
@ -105,7 +105,8 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin, Extension):
|
||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def updateAllFirmware(self, file_name):
|
def updateAllFirmware(self, file_name):
|
||||||
file_name = file_name.replace("file://", "") # File dialogs prepend the path with file://, which we don't need / want
|
if file_name.startswith("file://"):
|
||||||
|
file_name = QUrl(file_name).toLocalFile() # File dialogs prepend the path with file://, which we don't need / want
|
||||||
if not self._usb_output_devices:
|
if not self._usb_output_devices:
|
||||||
Message(i18n_catalog.i18nc("@info", "Unable to update firmware because there are no printers connected.")).show()
|
Message(i18n_catalog.i18nc("@info", "Unable to update firmware because there are no printers connected.")).show()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue