From 100cb872ad89637a05407b73f16522449fcd0c6e Mon Sep 17 00:00:00 2001 From: jneilliii Date: Wed, 14 Jun 2023 04:08:39 -0400 Subject: [PATCH 1/2] when basedir has double slash in path deleting a timelpase will not do anything due to the startswith check. (#4794) --- src/octoprint/server/api/timelapse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/server/api/timelapse.py b/src/octoprint/server/api/timelapse.py index 92bb9a2a4..67c883ed1 100644 --- a/src/octoprint/server/api/timelapse.py +++ b/src/octoprint/server/api/timelapse.py @@ -178,7 +178,7 @@ def deleteTimelapse(filename): thumb_path = octoprint.timelapse.create_thumbnail_path(full_path) if ( octoprint.timelapse.valid_timelapse(full_path) - and full_path.startswith(timelapse_folder) + and full_path.startswith(os.path.realpath(timelapse_folder)) and os.path.exists(full_path) and not util.is_hidden_path(full_path) ): @@ -192,7 +192,7 @@ def deleteTimelapse(filename): if ( octoprint.timelapse.valid_timelapse_thumbnail(thumb_path) - and thumb_path.startswith(timelapse_folder) + and thumb_path.startswith(os.path.realpath(timelapse_folder)) and os.path.exists(thumb_path) and not util.is_hidden_path(thumb_path) ): From 93667604f97723511eeb316a857059615d202fd7 Mon Sep 17 00:00:00 2001 From: "C.M.Rasch" <65172002+CMR-DEV@users.noreply.github.com> Date: Wed, 14 Jun 2023 10:09:42 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Fix=20docs=20of=20set=5Ftemp?= =?UTF-8?q?erature=20(#4815)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Gina Häußge --- AUTHORS.md | 1 + src/octoprint/printer/__init__.py | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 6a4e0241f..4de369152 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -176,6 +176,7 @@ date of first contribution): * [Moiz Rasheed](https://github.com/msrasheed) * [Scott Martin](https://github.com/smartin015) * [Shyam Sunder](https://github.com/sgsunder) + * [Conny Rasch](https://github.com/CMR-DEV) * [Christopher Perrin](https://github.com/cperrin88) OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by diff --git a/src/octoprint/printer/__init__.py b/src/octoprint/printer/__init__.py index 6b5d4d7c2..4d9f1d064 100644 --- a/src/octoprint/printer/__init__.py +++ b/src/octoprint/printer/__init__.py @@ -260,10 +260,12 @@ class PrinterInterface: Arguments: heater (str): The heater for which to set the target temperature. Either "bed" for setting the bed - temperature or something matching the regular expression "tool[0-9]+" (e.g. "tool0", "tool1", ...) for - the hotends of the printer + temperature, "chamber" for setting the temperature of the heated enclosure or something matching the + regular expression "tool[0-9]+" (e.g. "tool0", "tool1", ...) for the hotends of the printer. However, + addressing components that are disabled or unconfigured in the printer profile will result in a + "Suppressed command" error popup message. value (int, float): The temperature in celsius to set the target temperature to. - tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle + tags (set of str): An optional set of tags to attach to the command(s) throughout their lifecycle. """ raise NotImplementedError()