From 1218f58db47a91708b6a73160f07ca6d5c3be071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20HOUZ=C3=89?= Date: Wed, 21 Jul 2021 21:25:31 +0200 Subject: [PATCH] refactor: replace setModTime by Modified --- internal/provider/zip_archiver.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/provider/zip_archiver.go b/internal/provider/zip_archiver.go index 2650a2df..c0888eb7 100644 --- a/internal/provider/zip_archiver.go +++ b/internal/provider/zip_archiver.go @@ -62,8 +62,7 @@ func (a *ZipArchiver) ArchiveFile(infilename string) error { fh.Name = filepath.ToSlash(fi.Name()) fh.Method = zip.Deflate oldestZipSupportedModTime, _ := time.Parse(time.RFC3339, "1980-01-01T00:00:00+00:00") - // fh.Modified alone isn't enough when using a zero value - fh.SetModTime(oldestZipSupportedModTime) + fh.Modified = oldestZipSupportedModTime if a.outputFileMode != "" { filemode, err := strconv.ParseUint(a.outputFileMode, 0, 32) @@ -146,8 +145,7 @@ func (a *ZipArchiver) ArchiveDir(indirname string, excludes []string) error { fh.Name = filepath.ToSlash(relname) fh.Method = zip.Deflate oldestZipSupportedModTime, _ := time.Parse(time.RFC3339, "1980-01-01T00:00:00+00:00") - // fh.Modified alone isn't enough when using a zero value - fh.SetModTime(oldestZipSupportedModTime) + fh.Modified = oldestZipSupportedModTime if a.outputFileMode != "" { filemode, err := strconv.ParseUint(a.outputFileMode, 0, 32)