app/publisher: add zip download file times

Change-Id: I2a13a2588d2a2142ca3b89fbc61026030b8b0393
This commit is contained in:
Attila Tajti 2017-04-27 01:02:35 +02:00
parent 5d6c006be3
commit a684dd010a
1 changed files with 6 additions and 5 deletions

View File

@ -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)