From dedf9774c789aa79494eb35e5ee02dcf3eb3e542 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Tue, 5 Apr 2022 13:06:10 -0700 Subject: [PATCH] Set inspect-input.txt modtime (#14688) If no time given, use current time. --- cmd/admin-handlers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/admin-handlers.go b/cmd/admin-handlers.go index 4d8778809..a71da543f 100644 --- a/cmd/admin-handlers.go +++ b/cmd/admin-handlers.go @@ -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,