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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)