mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Set inspect-input.txt modtime (#14688)
If no time given, use current time.
This commit is contained in:
parent
6b1c62133d
commit
dedf9774c7
@ -2448,6 +2448,10 @@ func (a adminAPIHandlers) InspectDataHandler(w http.ResponseWriter, r *http.Requ
|
|||||||
// Not, set it to default.
|
// Not, set it to default.
|
||||||
si.Mode = 0o600
|
si.Mode = 0o600
|
||||||
}
|
}
|
||||||
|
if si.ModTime.IsZero() {
|
||||||
|
// Set time to now.
|
||||||
|
si.ModTime = time.Now()
|
||||||
|
}
|
||||||
header, zerr := zip.FileInfoHeader(dummyFileInfo{
|
header, zerr := zip.FileInfoHeader(dummyFileInfo{
|
||||||
name: filename,
|
name: filename,
|
||||||
size: si.Size,
|
size: si.Size,
|
||||||
|
Loading…
Reference in New Issue
Block a user