🐛 Fix renames not triggering watched folder

Closes #3705
This commit is contained in:
Gina Häußge committed 2020-09-07 13:56:52 +02:00
1 parent 1d09914f8c
commit 497cf925ab
1 file changed
+7 -1
+7 -1
View File
@@ -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