-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fixes regarding unwatching and rewatching a path #129
Merged
Merged
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ca15b52
tests: pass root dir of testing watcher through cleanpath
imsodin 7321520
trigger: Check that no watches remain on close
imsodin 07c566e
Add tests for unwatching and then watching the same path and set test…
imsodin cea90c3
readdcw: check state on every loop iteration
imsodin de41129
readdcw: Fix race (missing lock)
imsodin 1687b00
readdcw: Manually send unwatch events when watched file/folder was re…
imsodin 40b317d
fsevents: Don't canonicalize paths, tree does it already
imsodin 734d890
inotify: Handle removing of watches on non-existing paths
imsodin 9c33e90
trigger: When unwatching, rewatch in the correct mode (dir/ndir)
imsodin a55fe76
trigger: typo when watching fails (return nil -> err)
imsodin e2ec277
trigger: Specify common watched structure in watcher_trigger.go (dedup)
imsodin 46fab92
readdcw: polish (defer r.Unlock() where appropriate)
imsodin a65f5f9
readdcw: Some useful debug logging
imsodin 9a90a47
readdcw: Don't use atomic when lock is held
imsodin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
readdcw: Fix race (missing lock)
- Loading branch information
commit de41129de4dcb93ba35b81ff278d4f5ba269816c
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably we won't need
atomic
here anymore.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably the same in
nonStateWatched
, as it is only called when the lock is held, right?https://github.com/rjeczalik/notify/pull/129/files/45213bd71c5145dd70d258df0acaf721b59a7d90#diff-ac809f36d763355597370ab566b6d71aR478
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed 👍 🥇