From f4f4fb5bbdd8321481b8aeedec5cc4412d5001b5 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 30 Oct 2024 00:42:28 +0100 Subject: [PATCH] fs: fix Ctime returning Mtime Signed-off-by: Sebastiaan van Stijn --- fs/stat_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/stat_unix.go b/fs/stat_unix.go index 0edebdf..ddd697c 100644 --- a/fs/stat_unix.go +++ b/fs/stat_unix.go @@ -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) {