diff --git a/Cargo.toml b/Cargo.toml index 4d533b96..242245b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "notify" -version = "1.0.2" +version = "1.0.3" authors = ["FĂ©lix Saparelli "] description = "Cross-platform filesystem notification library" @@ -20,5 +20,4 @@ keywords = [ time = "*" [target.x86_64-unknown-linux-gnu.dependencies.inotify] -git = "https://github.com/hannobraun/inotify-rs.git" -version = "0.0.1" +version = "0.1" diff --git a/src/inotify/mod.rs b/src/inotify/mod.rs index 0a8ad28e..050f6d56 100644 --- a/src/inotify/mod.rs +++ b/src/inotify/mod.rs @@ -23,9 +23,11 @@ impl INotifyWatcher { let paths = self.paths.clone(); spawn(move || { loop { - match ino.event() { - Ok(e) => { - handle_event(e, &tx, &paths) + match ino.wait_for_events() { + Ok(es) => { + for e in es.iter() { + handle_event(e.clone(), &tx, &paths) + } }, Err(e) => { match e.kind {