Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: treat closed files accessed in write mode as modifications
For unknown reasons, it seems some environments emit a `Close` event, rather than a `Modify`, when a file is edited. As an example: [src/fs_utils.rs:71:9] &event = DebouncedEvent { event: Event { kind: Access( Close( Write, ), ), paths: [ "/home/redacted/content/blog/2024-06-23_example.md", ], attr:tracker: None, attr:flag: None, attr:info: None, attr:source: None, }, time: Instant { tv_sec: 78269, tv_nsec: 133499794, }, } Consequently, because this isn't treated by Zola as a modification, the site is not rebuilt, which regresses on previous behavior. This patch fixes this particular case by treating `Close` events, where the file was accessed `Write` mode, as a modification. Closes: getzola#2536
- Loading branch information