Skip to content

Commit 44e2adf

Browse files
authored
Merge pull request #261 from thaJeztah/fix_mtime
fs: fix Ctime returning Mtime
2 parents 3f84e3e + f4f4fb5 commit 44e2adf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/stat_unix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func Ctime(st fs.FileInfo) (time.Time, error) {
3838
if !ok {
3939
return time.Time{}, fmt.Errorf("expected st.Sys() to be *syscall.Stat_t, got %T", st.Sys())
4040
}
41-
return time.Unix(stSys.Atim.Unix()), nil
41+
return time.Unix(stSys.Ctim.Unix()), nil
4242
}
4343

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

0 commit comments

Comments
 (0)