From c6e1702c61db4765180c078e02af69f8ff6bb526 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 7 Jan 2026 23:34:36 -0800 Subject: [PATCH] fix: trust directory stats outside of Linux and macOS (#3528) Co-authored-by: sxyazi --- yazi-fs/src/mounts/partition.rs | 5 +++-- yazi-fs/src/mounts/partitions.rs | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/yazi-fs/src/mounts/partition.rs b/yazi-fs/src/mounts/partition.rs index 05eaf77b..158a833d 100644 --- a/yazi-fs/src/mounts/partition.rs +++ b/yazi-fs/src/mounts/partition.rs @@ -14,8 +14,9 @@ pub struct Partition { } impl Partition { - // Match mount types that do not reliably emit change notifications, or update directory - // metadata on changes, and should be refreshed frequently / heuristically. + // Match mount types that do not reliably emit change notifications, or do not + // update directory metadata on changes, and should be refreshed frequently / + // heuristically. pub fn heuristic(&self) -> bool { let b: &[u8] = self.fstype.as_ref().map_or(b"", |s| s.as_encoded_bytes()); matches!(b, b"exfat" | b"fuse.rclone") diff --git a/yazi-fs/src/mounts/partitions.rs b/yazi-fs/src/mounts/partitions.rs index b5bb83db..ac0725ab 100644 --- a/yazi-fs/src/mounts/partitions.rs +++ b/yazi-fs/src/mounts/partitions.rs @@ -38,7 +38,9 @@ impl Partitions { } #[cfg(not(any(target_os = "linux", target_os = "macos")))] { - true + // For now, assume other targets update directory stat data correctly & do not + // need heuristic polling. + false } } }