Fix inspect format.json exclusion (#18871)

Right now the format.json is excluded if anything within `.minio.sys` is requested.

I assume the check was meant to exclude only if it was actually requesting it.
This commit is contained in:
Klaus Post 2024-01-25 15:59:00 -08:00 committed by GitHub
parent 74851834c0
commit a113b2c394
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3092,7 +3092,7 @@ func (a adminAPIHandlers) InspectDataHandler(w http.ResponseWriter, r *http.Requ
}
// save the format.json as part of inspect by default
if volume != minioMetaBucket && file != formatConfigFile {
if !(volume == minioMetaBucket && file == formatConfigFile) {
err = o.GetRawData(ctx, minioMetaBucket, formatConfigFile, rawDataFn)
}
if !errors.Is(err, errFileNotFound) {