mirror of https://github.com/perkeep/perkeep.git
app/publisher: add zip download file times
Change-Id: I2a13a2588d2a2142ca3b89fbc61026030b8b0393
This commit is contained in:
parent
5d6c006be3
commit
a684dd010a
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue