diff --git a/CHANGES.txt b/CHANGES.txt index cc7cdb217..7ab2506a8 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,7 @@ Bugfixes * Restore `annotation_helper.tmpl` with dummy content - fix themes still mentioning it (Issue #3764, #3773) +* Fix compatibility with watchdog 4 (Issue #3766) New in v8.3.1 ============= diff --git a/nikola/plugins/command/auto/__init__.py b/nikola/plugins/command/auto/__init__.py index f05dbcf19..b490e15d4 100644 --- a/nikola/plugins/command/auto/__init__.py +++ b/nikola/plugins/command/auto/__init__.py @@ -429,7 +429,7 @@ async def reload_page(self, event) -> None: # Move events have a dest_path, some editors like gedit use a # move on larger save operations for write protection if event: - event_path = event.dest_path if hasattr(event, 'dest_path') else event.src_path + event_path = event.dest_path if (hasattr(event, 'dest_path') and event.dest_path) else event.src_path else: event_path = self.site.config['OUTPUT_FOLDER'] p = os.path.relpath(event_path, os.path.abspath(self.site.config['OUTPUT_FOLDER'])).replace(os.sep, '/')