Return None on mtime overflow

This commit is contained in:
norepro 2026-08-05 22:26:52 -07:00 • committed by Will Sheehan
parent 3aa55b07b7
commit a5422167cf

View file

@ -1909,7 +1909,7 @@ impl ItemMetadata {
Self::Path { metadata, .. } => metadata.modified().ok(),
#[cfg(feature = "gvfs")]
Self::GvfsPath { mtime, .. } => {
Some(SystemTime::UNIX_EPOCH + Duration::from_secs(*mtime))
SystemTime::UNIX_EPOCH.checked_add(Duration::from_secs(*mtime))
}
_ => None,
}