-
Notifications
You must be signed in to change notification settings - Fork 254
Open
Description
When attempting to recursively watch the root directory (/) using KqueueWatcher, Watcher::watch returns "No such file or directory (os error 2)".
MRE
# Cargo.toml
[package]
name = "notify_kqueue_mre"
edition = "2024"
[dependencies]
notify = { version = "8.1.0", default-features = false, features = ["macos_kqueue"] }// src/main.rs
use std::{path::Path, sync::mpsc::channel};
use notify::{Config, KqueueWatcher, RecursiveMode, Watcher as _};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let (sender, receiver) = channel();
let mut watcher = KqueueWatcher::new(sender, Config::default())?;
watcher.watch(Path::new("/"), RecursiveMode::Recursive)?;
for _result in receiver {
// ...
}
Ok(())
}This MRE outputs the following:
Error: Error { kind: Generic("No such file or directory (os error 2)"), paths: [] }
Environment
notify: 8.1.0
Rust: 1.87.0
OS: macOS 26.0 Beta (25A5306g)
Metadata
Metadata
Assignees
Labels
No labels