Set inspect-input.txt modtime (#14688)

If no time given, use current time.
This commit is contained in:
Klaus Post 2022-04-05 13:06:10 -07:00 committed by GitHub
parent 6b1c62133d
commit dedf9774c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2448,6 +2448,10 @@ func (a adminAPIHandlers) InspectDataHandler(w http.ResponseWriter, r *http.Requ
// Not, set it to default.
si.Mode = 0o600
}
if si.ModTime.IsZero() {
// Set time to now.
si.ModTime = time.Now()
}
header, zerr := zip.FileInfoHeader(dummyFileInfo{
name: filename,
size: si.Size,