summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-01-03 06:36:33 -0600
committerAlejandro Soto <alejandro@34project.org>2022-01-03 06:36:33 -0600
commit7a72e3f54d48f29517d7961590d418b1c60dfeaa (patch)
tree7bc501f900826bfae9bbbcb1a8c67efee3c32929
parentbf07291c069028d84b242222d1f89de5e673e636 (diff)
Fix ctime which is change (not creation) time
Diffstat (limited to '')
-rw-r--r--examples/ext2.rs4
-rw-r--r--src/fuse/io.rs6
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
})
}