From 7a72e3f54d48f29517d7961590d418b1c60dfeaa Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Mon, 3 Jan 2022 06:36:33 -0600 Subject: Fix ctime which is change (not creation) time --- examples/ext2.rs | 4 ++-- src/fuse/io.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/ext2.rs b/examples/ext2.rs index b51c9e5..025802f 100644 --- a/examples/ext2.rs +++ b/examples/ext2.rs @@ -458,7 +458,7 @@ impl Known for Resolved { fn attrs(&self) -> (Attrs, Ttl) { let inode = self.inode; - let (access, modify, create) = { + let (access, modify, change) = { let time = |seconds: u32| (UNIX_EPOCH + Duration::from_secs(seconds.into())).into(); let (atime, mtime, ctime) = (inode.i_atime, inode.i_mtime, inode.i_ctime); @@ -474,7 +474,7 @@ impl Known for Resolved { .mode(Mode::from_bits_truncate(inode.i_mode.into())) .blocks(inode.i_blocks.into()) .block_size(512) - .times(access, modify, create) + .times(access, modify, change) .links(inode.i_links_count.into()); (attrs, Ttl::MAX) diff --git a/src/fuse/io.rs b/src/fuse/io.rs index f3dc5b1..fe2fb36 100644 --- a/src/fuse/io.rs +++ b/src/fuse/io.rs @@ -246,14 +246,14 @@ impl Attrs { } #[must_use] - pub fn times(self, access: Timestamp, modify: Timestamp, create: Timestamp) -> Self { + pub fn times(self, access: Timestamp, modify: Timestamp, change: Timestamp) -> Self { Attrs(proto::Attrs { atime: access.seconds, mtime: modify.seconds, - ctime: create.seconds, + ctime: change.seconds, atimensec: access.nanoseconds, mtimensec: modify.nanoseconds, - ctimensec: create.nanoseconds, + ctimensec: change.nanoseconds, ..self.0 }) } -- cgit v1.2.3