Skip to content

Commit

Permalink
Merge pull request #261 from thaJeztah/fix_mtime
Browse files Browse the repository at this point in the history
fs: fix Ctime returning Mtime
  • Loading branch information
AkihiroSuda authored Oct 30, 2024
2 parents 3f84e3e + f4f4fb5 commit 44e2adf
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 44e2adf

Please sign in to comment.