mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
gateway/azure: ListParts return an empty list if no parts uploaded yet (#5230)
This makes azure ListParts implementation behave more like S3 by returning an empty list rather than an error when no parts have been uploaded yet.
This commit is contained in:
parent
685afb6749
commit
6a2d7ae808
@ -746,6 +746,11 @@ func (a *azureObjects) ListObjectParts(bucket, object, uploadID string, partNumb
|
||||
|
||||
objBlob := a.client.GetContainerReference(bucket).GetBlobReference(object)
|
||||
resp, err := objBlob.GetBlockList(storage.BlockListTypeUncommitted, nil)
|
||||
azureErr, ok := err.(storage.AzureStorageServiceError)
|
||||
if ok && azureErr.StatusCode == http.StatusNotFound {
|
||||
// If no parts are uploaded yet then we return empty list.
|
||||
return result, nil
|
||||
}
|
||||
if err != nil {
|
||||
return result, azureToObjectError(errors.Trace(err), bucket, object)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user