Skip to content

Commit d4dd675

Browse files
Fix bugeous crtime value on macOS
During certain operation, macOS use some helper that send request to the mountpoint with `crtime` set to `0xffff83da4f80`. That value correspond to `-2_082_844_800u64` which is the difference between the date 1904-01-01 and 1970-01-01 because macOS epoch start at 1904 and not 1970. <macfuse/macfuse#1042> Fix #217
1 parent d675c07 commit d4dd675

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ll/request.rs

+4
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,10 @@ mod op {
427427
#[cfg(target_os = "macos")]
428428
match self.arg.valid & FATTR_CRTIME {
429429
0 => None,
430+
// During certain operation, macOS use some helper that send request to the mountpoint with `crtime` set to 0xffffffff83da4f80.
431+
// That value correspond to `-2_082_844_800u64` which is the difference between the date 1904-01-01 and 1970-01-01 because macOS epoch start at 1904 and not 1970.
432+
// https://github.com/macfuse/macfuse/issues/1042
433+
_ if self.arg.crtime == 0xffffffff83da4f80 => None,
430434
_ => Some(
431435
SystemTime::UNIX_EPOCH + Duration::new(self.arg.crtime, self.arg.crtimensec),
432436
),

0 commit comments

Comments
 (0)