Fixed the Event of watch dir Deletion#540
Merged
0xpr03 merged 8 commits intonotify-rs:mainfrom Nov 1, 2023
zeroishero:main
Merged
Fixed the Event of watch dir Deletion#5400xpr03 merged 8 commits intonotify-rs:mainfrom zeroishero:main
0xpr03 merged 8 commits intonotify-rs:mainfrom
zeroishero:main
Conversation
0xpr03
reviewed
Oct 7, 2023
0xpr03
reviewed
Oct 7, 2023
0xpr03
reviewed
Oct 7, 2023
0xpr03
requested changes
Oct 7, 2023
Member
0xpr03
left a comment
There was a problem hiding this comment.
Thanks! I've added some comments, let me know if you want to leave them to me or refactor those parts by yourself.
Contributor
Author
|
I added the comment for watches HashMap. |
Co-authored-by: Aron <[email protected]>
Member
|
Any reason to close it ? I did ask for another thing: The unwrap you're using seems like something that could crash. Otherwise the PR is fine. |
Contributor
Author
|
@0xpr03 are there more changes I should do before it gets approved? |
Member
|
Looks good, I'm just too busy right now and don't wanna rush things. |
0xpr03
approved these changes
Nov 1, 2023
notify/src/inotify.rs
Outdated
| if path.is_none() { | ||
| remove_kind = RemoveKind::Other | ||
| } else { | ||
| let watched_path = path.clone().unwrap(); |
Member
There was a problem hiding this comment.
Looking at this now: When does this unwrap fail ? Do we need to clone here ?
Member
|
Huh so apparently github never send my review.. Sorry for that.. |
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.
Resolves #493
Deleting watched dir only returns Delete self and Ignore event. Unlike deleting other folders, it doesn't return events to check whether it is dir or not.
I stored whether path is dir or not in watches. Taking metadata after delete event triggers is not possible.