From 497cf925abb533c1908e5143d13f2c708cab1230 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 7 Sep 2020 13:56:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20renames=20not=20triggering?= =?UTF-8?q?=20watched=20folder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3705 --- src/octoprint/server/util/watchdog.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/octoprint/server/util/watchdog.py b/src/octoprint/server/util/watchdog.py index b94f5010c..02ad7f27c 100644 --- a/src/octoprint/server/util/watchdog.py +++ b/src/octoprint/server/util/watchdog.py @@ -91,7 +91,13 @@ class GcodeWatchdogHandler(watchdog.events.PatternMatchingEventHandler): thread.start() def on_created(self, event): - path = event.src_path + self._start_check(event.src_path) + + def on_moved(self, event): + # for move/rename we are only interested in the dest_path + self._start_check(event.dest_path) + + def _start_check(self, path): if not self._valid_path(path): return