From 9535063628fea1c64f7b066d700743806f886b98 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Wed, 7 Jan 2026 11:51:34 -0800 Subject: [PATCH] Refactor follow-up: Trust dir stats outside linux & mac Restore the previous default of trusting directory stat updates to reflect directory changes on platforms other than linux & mac, without checking for mount types. Also clarify wording in heuristic comment slightly. --- yazi-fs/src/mounts/partition.rs | 4 ++-- yazi-fs/src/mounts/partitions.rs | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/yazi-fs/src/mounts/partition.rs b/yazi-fs/src/mounts/partition.rs index 05eaf77b..b920169c 100644 --- a/yazi-fs/src/mounts/partition.rs +++ b/yazi-fs/src/mounts/partition.rs @@ -14,8 +14,8 @@ 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..b04d3e92 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 } } }