Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that a bulk change across multiple files did trigger multiple times. Using the tool
mkslideswhich is based onlivereload.Not 100% sure about the change and if the original implementation may have a reason. My assumption is that in
is_folder_changedwe 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.