Skip to content

Report every changed file in a watched directory at once in is_folder_changed - #290

Open
johbo wants to merge 1 commit into
lepture:masterfrom
johbo:folder-changed-records-all
Open

johbo wants to merge 1 commit into
lepture:masterfrom
johbo:folder-changed-records-all

Conversation

@johbo

@johbo johbo commented Sep 20, 2026

Copy link
Copy Markdown

I noticed that a bulk change across multiple files did trigger multiple times. Using the tool mkslides which is based on livereload.

Not 100% sure about the change and if the original implementation may have a reason. My assumption is that in is_folder_changed we should walk all files so that the bookkeeping is correct, then it triggers only once. Tried to model this in the test case.

Also found #205 which I think is describing the same problem, but was not reproduced back then on MacOS. I've been bumping into this on a Linux machine, unclear to me if the OS could have made a difference.

is_file_changed records each file's mtime as it goes, and is_changed
commits those afterwards. Returning at the first changed file left the
remaining ones unrecorded, so a directory with N changed files reported
one per poll over N polls.

The glob path already walks every match.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant