Skip to content

Commit

Permalink
fs: fix Ctime returning Mtime
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Oct 29, 2024
1 parent 0e83ada commit f4f4fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/stat_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Ctime(st fs.FileInfo) (time.Time, error) {
if !ok {
return time.Time{}, fmt.Errorf("expected st.Sys() to be *syscall.Stat_t, got %T", st.Sys())
}
return time.Unix(stSys.Atim.Unix()), nil
return time.Unix(stSys.Ctim.Unix()), nil
}

func Mtime(st fs.FileInfo) (time.Time, error) {
Expand Down

0 comments on commit f4f4fb5

Please sign in to comment.