Fix remove watch+ base tree.event gen#8
Merged
Elias481 merged 6 commits intopending-fixesfrom Sep 19, 2018
Merged
Conversation
The remove_watch method takes a superficial parameter but never used it, which made the remove_watch_with_id function set it as False by default. This fixes that behavior by propagating the parameter. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
The previous behavior was duplicating a block of code and making one of the two useless. This fixes that by replacing the constant to IN_DELETE instead of IN_MOVED_FROM in one of the two blocks. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Propagate superficial parameter to remove_watch_with_id
Fix constant in adapter to match with DELETE events
…ith_fd] functions _BaseTree.event_gen(): remove duplicate IN_MOVED_TO, change superficial to False for IN_MOVED_TO Inotify.remove_watch_with_fd(): as this is a public function it should be possible to call this function without causing inconsitencies which are recoverable only with some dirty try/catch construct... there is also never a need to only remove the wfd from the adaptors list while keeping th path name in list. .. now functions remove_watch and remove_watch_with_fd are the same, only difference is parameter eighter pathname or watch-fd addtionally bot functions now accept a thirst state (None) for superficial - used to skip the "superficial" actions and just remove the wd from inotify (there are use-cases for this, for example with threading to be able to disable wathing from one thread while watching thread get the notification about watch end from inotify an clean up the inotify "superficial").
…oing non-superficial remove)
Pull Request Test Coverage Report for Build 20
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 20
💛 - Coveralls |
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.
No description provided.