api/weldr: add missing modtime to tar returned by /compose/logs

This file was surely not created on 1970-01-01, this commit sets the ModTime
to the current datetime.
This commit is contained in:
Ondřej Budai 2020-07-14 10:01:34 +02:00 committed by Tom Gundersen
parent 454e471af8
commit b4a57225a7

View file

@ -2421,9 +2421,10 @@ func (api *API) composeLogsHandler(writer http.ResponseWriter, request *http.Req
common.PanicOnError(err)
header := &tar.Header{
Name: "logs/osbuild.log",
Mode: 0644,
Size: int64(fileContents.Len()),
Name: "logs/osbuild.log",
Mode: 0644,
Size: int64(fileContents.Len()),
ModTime: time.Now().Truncate(time.Second),
}
err = tw.WriteHeader(header)