From 6430b239b2ad4e226ef5644066d9099c72093c91 Mon Sep 17 00:00:00 2001 From: jneilliii Date: Thu, 10 Feb 2022 12:30:20 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20timelapse=20snapshots=20fo?= =?UTF-8?q?r=20files=20with=20%=20in=20the=20name=20(#4366)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #4365 --- src/octoprint/timelapse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/timelapse.py b/src/octoprint/timelapse.py index cbeebd077..d7f649657 100644 --- a/src/octoprint/timelapse.py +++ b/src/octoprint/timelapse.py @@ -604,7 +604,8 @@ class Timelapse: self._in_timelapse = True self._gcode_file = os.path.basename(gcode_file) self._file_prefix = "{}_{}".format( - os.path.splitext(self._gcode_file)[0], time.strftime("%Y%m%d%H%M%S") + os.path.splitext(self._gcode_file)[0].replace("%", "%%"), + time.strftime("%Y%m%d%H%M%S"), ) def stop_timelapse(self, do_create_movie=True, success=True):