snowball: use latest time when mtime is missing (#17133)

This commit is contained in:
Klaus Post
2023-05-04 07:29:33 -07:00
committed by GitHub
parent bb6f4d7633
commit 7f7b489a3d

View File

@@ -2142,6 +2142,9 @@ func (api objectAPIHandlers) PutObjectExtractHandler(w http.ResponseWriter, r *h
return err
}
opts.MTime = info.ModTime()
if opts.MTime.Unix() <= 0 {
opts.MTime = UTCNow()
}
opts.IndexCB = idxCb
retentionMode, retentionDate, legalHold, s3err := checkPutObjectLockAllowed(ctx, r, bucket, object, getObjectInfo, retPerms, holdPerms)