mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Treat empty xl.json as file not found (#6804)
If the buffer is empty we can avoid parsing it and treat it essentially as `xl.json` is effectively missing.
This commit is contained in:
parent
2447bb58dd
commit
c82acc599a
@ -311,6 +311,9 @@ func readXLMeta(ctx context.Context, disk StorageAPI, bucket string, object stri
|
||||
}
|
||||
return xlMetaV1{}, err
|
||||
}
|
||||
if len(xlMetaBuf) == 0 {
|
||||
return xlMetaV1{}, errFileNotFound
|
||||
}
|
||||
// obtain xlMetaV1{} using `github.com/tidwall/gjson`.
|
||||
xlMeta, err = xlMetaV1UnmarshalJSON(ctx, xlMetaBuf)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user