Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/watcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ impl Watcher {
RecursiveMode::NonRecursive
};

let mut watcher_paths = self.inner.paths_mut();
for p in paths {
let path = PathBuf::from(&p);

Expand All @@ -99,7 +100,7 @@ impl Watcher {
)));
}

let result = self.inner.watch(&path, mode);
let result = watcher_paths.add(Path::new(&p), mode);

if let Err(err) = result {
if !ignore_perm {
Expand All @@ -110,6 +111,8 @@ impl Watcher {
// self.file_cache.add_root(path, mode);
}

watcher_paths.commit().ok();
Comment thread
c-h-russell-walker marked this conversation as resolved.
Outdated

if self.debug {
println!("watcher: {:?}", self.inner);
}
Expand Down