notify-rs / notify

🔭 Cross-platform filesystem notification library for Rust.
https://docs.rs/notify
2.77k stars 222 forks source link

Fixed the Event of watch dir Deletion #540

Closed zeroishero closed 1 year ago

zeroishero commented 1 year ago

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.

zeroishero commented 1 year ago

I added the comment for watches HashMap.

0xpr03 commented 1 year ago

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.

zeroishero commented 1 year ago

@0xpr03 are there more changes I should do before it gets approved?

0xpr03 commented 1 year ago

Looks good, I'm just too busy right now and don't wanna rush things.

0xpr03 commented 1 year ago

Huh so apparently github never send my review.. Sorry for that..