Skip to content

Commit

Permalink
fix: PollWatcher panic after delete-and-recreate
Browse files Browse the repository at this point in the history
See notify-rs#359 for more detail.
  • Loading branch information
visig9 committed May 18, 2022
1 parent 1cfcbbb commit d52d86b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ impl PollWatcher {
);
match paths.insert(watch.clone(), path_data.clone()) {
None => {
unreachable!();
let kind = EventKind::Create(CreateKind::Any);
let ev = Event::new(kind).add_path(watch.clone());
event_handler(Ok(ev));
}
Some(old_path_data) => {
if let Some(kind) =
Expand Down

0 comments on commit d52d86b

Please sign in to comment.