From 8e4050b92302311b29f8e2993f61875bc609eae2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Feb 2025 14:12:46 +0530 Subject: [PATCH] ... --- tools/stat/api.go | 2 -- tools/stat/get1.go | 2 ++ tools/stat/get2.go | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/stat/api.go b/tools/stat/api.go index 695bbfe43..084271d68 100644 --- a/tools/stat/api.go +++ b/tools/stat/api.go @@ -34,8 +34,6 @@ func (s *StatResult) setup_common(f fs.FileInfo) (u *syscall.Stat_t) { u = nil } if u != nil { - s.Has_atime = true - s.Has_ctime = true s.Dev = uint64(u.Dev) s.Ino = uint64(u.Ino) s.Has_dev = true diff --git a/tools/stat/get1.go b/tools/stat/get1.go index b2ba53941..68ff68b74 100644 --- a/tools/stat/get1.go +++ b/tools/stat/get1.go @@ -13,6 +13,8 @@ var _ = fmt.Print func Get(f fs.FileInfo) (ans StatResult) { u := ans.setup_common(f) if u != nil { + ans.Has_atime = true + ans.Has_ctime = true ans.Ctime = time.Unix(u.Ctim.Unix()) ans.Atime = time.Unix(u.Atim.Unix()) } diff --git a/tools/stat/get2.go b/tools/stat/get2.go index 747ffe33d..20bf99631 100644 --- a/tools/stat/get2.go +++ b/tools/stat/get2.go @@ -13,6 +13,8 @@ var _ = fmt.Print func Get(f fs.FileInfo) (ans StatResult) { u := ans.setup_common(f) if u != nil { + ans.Has_atime = true + ans.Has_ctime = true ans.Ctime = time.Unix(u.Ctimespec.Unix()) ans.Atime = time.Unix(u.Atimespec.Unix()) }