From 29a197522e213bb75706e756ab0053ac3f47fabd Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sat, 29 Mar 2025 14:45:34 -0700 Subject: [PATCH] drivers/copy: simplify atime conversion Mostly to avoid explicit typecasts. Signed-off-by: Kir Kolyshkin --- drivers/copy/copy_linux.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/copy/copy_linux.go b/drivers/copy/copy_linux.go index 5187bc8ca..aaab2d480 100644 --- a/drivers/copy/copy_linux.go +++ b/drivers/copy/copy_linux.go @@ -242,12 +242,11 @@ func DirCopy(srcDir, dstDir string, copyMode Mode, copyXattrs bool) error { } // system.Chtimes doesn't support a NOFOLLOW flag atm - // nolint: unconvert if f.IsDir() { dirsToSetMtimes.PushFront(&dirMtimeInfo{dstPath: &dstPath, stat: stat}) } else if !isSymlink { - aTime := time.Unix(int64(stat.Atim.Sec), int64(stat.Atim.Nsec)) - mTime := time.Unix(int64(stat.Mtim.Sec), int64(stat.Mtim.Nsec)) + aTime := time.Unix(stat.Atim.Unix()) + mTime := time.Unix(stat.Mtim.Unix()) if err := system.Chtimes(dstPath, aTime, mTime); err != nil { return err }