You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::error::Error;use std::path::PathBuf;use notify::{recommended_watcher,RecursiveMode,Watcher};fnmain() -> Result<(),Box<dynError>>{let path = PathBuf::from("src");letmut watcher = recommended_watcher(|event| println!("{:?}", event))?;
watcher.watch(&path,RecursiveMode::Recursive)?;
watcher.unwatch(&path)?;// <- This always returns "No such file or directory"Ok(())}
Stepping through the source of kqueue.rs, and subsequently the kqueue crate, the error seems to be triggered in Watcher::remove_filename, specifically when calling Watcher::delete_kevents. What's also very weird is that when I try to set a break point in this function CodeLLDB goes absolutely nuts and allocates more than 40 GB before my computer goes poof.
What you expected
Watcher::unwatch does not throw.
What happened
Error: Error { kind: Generic("No such file or directory (os error 2) about [\".../src\"]"), paths: [] }
The text was updated successfully, but these errors were encountered:
System details
rustc --version
: rustc 1.81.0 (eeb90cda1 2024-09-04)macos_kqueue
feature flagWhat you did (as detailed as you can)
I'm trying to use
kqueue
on macOS, butWatcher::unwatch
always returns an error. Here is a minimal reproduction:Source of the program:
Stepping through the source of
kqueue.rs
, and subsequently thekqueue
crate, the error seems to be triggered inWatcher::remove_filename
, specifically when callingWatcher::delete_kevents
. What's also very weird is that when I try to set a break point in this function CodeLLDB goes absolutely nuts and allocates more than 40 GB before my computer goes poof.What you expected
Watcher::unwatch
does not throw.What happened
The text was updated successfully, but these errors were encountered: