Allow recursive watch with --include#229
Merged
ericcurtin merged 1 commit intoinotify-tools:masterfrom Dec 20, 2024
Merged
Conversation
Contributor
Author
|
@ericcurtin Could you have a look at this suggestion? :-) |
ericcurtin
approved these changes
Dec 20, 2024
Member
ericcurtin
left a comment
There was a problem hiding this comment.
If the builds pass I don't see any reason why we shouldn't merge this :)
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.
This addition changes the functionality of the --recursive flag when it's used with --include.
Prior to the change, when watching a folder recursively, watches are not added for newly created subdirectorires unless they match the filter.
With this change, folders are not matched against the filter when deciding to monitor them recursively.
Scenario:
Prior to the changes:
7. Create a folder /tmp/x/z/ -> inotify does not notice this or set recursive watch (because it does not match the filter)
8. Create a file /tmp/x/z/test.txt -> inotify does not notice, since it's not recursively watching.
With the changes:
7. Create a folder /tmp/x/z/ -> inotify sets a recursive watch on this folder, even if it does not match the filter
8. Create a file /tmp/x/z/test.txt -> inotify notices this file because it's watching recursively and it matches the filter
There are multiple mentions of this or similar issues in the Issues list, and I hit the same issue when starting to use inotifywait:
#224
#199
#168