fix: fallback to PollWatcher on NetBSD

This commit is contained in:
sxyazi 2025-07-03 21:40:33 +08:00
parent ffdd74b6ab
commit 041cc08aa0
No known key found for this signature in database

View file

@ -36,7 +36,7 @@ impl Watcher {
};
let config = notify::Config::default().with_poll_interval(Duration::from_millis(500));
if yazi_adapter::WSL.get() {
if yazi_adapter::WSL.get() || cfg!(target_os = "netbsd") {
tokio::spawn(Self::fan_in(in_rx, PollWatcher::new(handler, config).unwrap()));
} else {
tokio::spawn(Self::fan_in(in_rx, RecommendedWatcher::new(handler, config).unwrap()));