From 57bf457d973307f92e93bb335eada4a1bb795e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 22 Oct 2015 13:42:57 +0200 Subject: [PATCH] Fix: current filename in job data should never be prefixed with / That was a tiny detail missing in 8bef18c2a82a70b7be968908534d68d6bea16f39 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). --- src/octoprint/printer/standard.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/octoprint/printer/standard.py b/src/octoprint/printer/standard.py index 8e11b642..8b909705 100644 --- a/src/octoprint/printer/standard.py +++ b/src/octoprint/printer/standard.py @@ -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)