Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properly support watchdog 4+ where events always have dest_path #3775

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
=============
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/command/auto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Kwpolska marked this conversation as resolved.
Show resolved Hide resolved
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, '/')
Expand Down
Loading