Fix: current filename in job data should never be prefixed with /

That was a tiny detail missing in 8bef18c2a8 that
caused issues with detecting which file was currently selected on the printer's
SD card (for "do not delete that" checks on the API).
This commit is contained in:
Gina Häußge 2015-10-22 13:42:57 +02:00
parent adf39cdf21
commit 57bf457d97

View file

@ -645,6 +645,8 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
if filename is not None:
if sd:
path_in_storage = filename
if path_in_storage.startswith("/"):
path_in_storage = path_in_storage[1:]
path_on_disk = None
else:
path_in_storage = self._fileManager.path_in_storage(FileDestinations.LOCAL, filename)