Skip to content

Commit

Permalink
Fix #3766 - properly support watchdog 4+ where events always have des…
Browse files Browse the repository at this point in the history
…t_path, but it can be empty (#3775)
  • Loading branch information
evgeni committed May 22, 2024
1 parent ccf74ad commit f7989de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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
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

0 comments on commit f7989de

Please sign in to comment.