Skip to content

Commit

Permalink
Fix #8942: Fix the ctime of files set to the created time instead…
Browse files Browse the repository at this point in the history
… of the `updated` time.

Co-authored-by: Marcos Medrano <[email protected]>
  • Loading branch information
FirelightFlagboy and mmmarcos committed Jan 24, 2025
1 parent dde5e13 commit abce6ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libparsec/crates/platform_mountpoint/src/unix/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions newsfragments/8942.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix file changed timestamp (ctime) on Unix systems

0 comments on commit abce6ef

Please sign in to comment.