From b083f5e74a28a0b13bca8faddd2b0c8feb76127d Mon Sep 17 00:00:00 2001 From: Firelight Flagboy Date: Fri, 20 Dec 2024 11:56:58 +0100 Subject: [PATCH] Fix #8942: Fix the `ctime` of files set to the `created` time instead of the `updated` time. Co-authored-by: Marcos Medrano <786907+mmmarcos@users.noreply.github.com> --- libparsec/crates/platform_mountpoint/src/unix/filesystem.rs | 4 ++-- newsfragments/8942.bugfix.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 newsfragments/8942.bugfix.rst diff --git a/libparsec/crates/platform_mountpoint/src/unix/filesystem.rs b/libparsec/crates/platform_mountpoint/src/unix/filesystem.rs index 85bc1fcde7c..fde891c8974 100644 --- a/libparsec/crates/platform_mountpoint/src/unix/filesystem.rs +++ b/libparsec/crates/platform_mountpoint/src/unix/filesystem.rs @@ -52,7 +52,7 @@ fn file_stat_to_file_attr(stat: FileStat, inode: Inode, uid: u32, gid: u32) -> f blocks: (stat.size + BLOCK_SIZE - 1) / BLOCK_SIZE, atime: updated, mtime: updated, - ctime: created, + ctime: updated, crtime: created, kind: fuser::FileType::RegularFile, perm: PERMISSIONS, @@ -81,7 +81,7 @@ fn entry_stat_to_file_attr(stat: EntryStat, inode: Inode, uid: u32, gid: u32) -> blocks: (size + BLOCK_SIZE - 1) / BLOCK_SIZE, atime: updated, mtime: updated, - ctime: created, + ctime: updated, crtime: created, kind: fuser::FileType::RegularFile, perm: PERMISSIONS, diff --git a/newsfragments/8942.bugfix.rst b/newsfragments/8942.bugfix.rst new file mode 100644 index 00000000000..8b64a0a117c --- /dev/null +++ b/newsfragments/8942.bugfix.rst @@ -0,0 +1 @@ +Fix file changed timestamp (ctime) on Unix systems