Skip to content

Commit 77dbd4b

Browse files
authored
Merge pull request #1897 from GitoxideLabs/fix-ci
improve detection of nanosecond support in `gix-fs` (#1896)
2 parents 74ecdb8 + 2c9b214 commit 77dbd4b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: gix-fs/tests/fs/snapshot.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,8 @@ fn has_nanosecond_times(root: &Path) -> std::io::Result<bool> {
5050
std::fs::write(&test_file, "b")?;
5151
let second_time = test_file.metadata()?.modified()?;
5252

53-
Ok(first_time != second_time)
53+
Ok(second_time.duration_since(first_time).is_ok_and(|d|
54+
// This can be falsely false if a filesystem would be ridiculously fast,
55+
// which means a test won't run even though it could. But that's OK, and unlikely.
56+
d.subsec_nanos() != 0))
5457
}

0 commit comments

Comments
 (0)