From a684dd010a6470aba2d3137ec17b2128af2e249d Mon Sep 17 00:00:00 2001 From: Attila Tajti Date: Thu, 27 Apr 2017 01:02:35 +0200 Subject: [PATCH] app/publisher: add zip download file times Change-Id: I2a13a2588d2a2142ca3b89fbc61026030b8b0393 --- app/publisher/zip.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/publisher/zip.go b/app/publisher/zip.go index bae38bc96..ac2f04c71 100644 --- a/app/publisher/zip.go +++ b/app/publisher/zip.go @@ -265,11 +265,12 @@ func (zh *zipHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { http.Error(rw, "Server error", http.StatusInternalServerError) return } - f, err := zw.CreateHeader( - &zip.FileHeader{ - Name: file.path, - Method: zip.Store, - }) + zh := zip.FileHeader{ + Name: file.path, + Method: zip.Store, + } + zh.SetModTime(fr.ModTime()) + f, err := zw.CreateHeader(&zh) if err != nil { log.Printf("Could not create %q in zip: %v", file.path, err) http.Error(rw, "Server error", http.StatusInternalServerError)