fix: fallback to PollWatcher on NetBSD (#2941)

This commit is contained in:
三咲雅 misaki masa 2025-07-03 21:41:49 +08:00 committed by GitHub
parent 39f50c898b
commit ec7eb3e416
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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()));