From e095ef1fe1b35aa7e19c06b606f2dadf56afc6dd Mon Sep 17 00:00:00 2001 From: bflatastic Date: Sat, 17 Oct 2026 16:08:01 +0700 Subject: [PATCH] #652: note that a file stamped in the future is re-read until the clock passes it --- crates/engine/src/library.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/engine/src/library.rs b/crates/engine/src/library.rs index 5f87c862..daa1f5bd 100644 --- a/crates/engine/src/library.rs +++ b/crates/engine/src/library.rs @@ -459,6 +459,8 @@ struct Entry { const RACY_STAMP: std::time::Duration = std::time::Duration::from_secs(2); impl Entry { + /// A file stamped in the future (clock skew, unpacked archives) never settles: it is re-read on + /// every load until the clock passes it. fn still_valid(&self, now: &Stamp) -> bool { let settled = match (now.modified, self.read_at) { (Some(modified), Some(read_at)) => modified.checked_add(RACY_STAMP).is_some_and(|t| t < read_at),