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.
This commit is contained in:
Gabriel Wicke 2026-01-07 11:51:34 -08:00
parent 30ac041d9e
commit 9535063628
2 changed files with 5 additions and 3 deletions

View file

@ -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")

View file

@ -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
}
}
}