mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
XL/fs: ListMultipartUploads should list only requested entries. (#1668)
Fixes #1665
This commit is contained in:
parent
3c1ef3fee2
commit
404364ba73
@ -373,6 +373,12 @@ func listMetaBucketMultipartFiles(layer ObjectLayer, prefixPath string, markerPa
|
||||
}
|
||||
fileInfo.Name = path.Join(fi.Name, entry)
|
||||
fileInfos = append(fileInfos, fileInfo)
|
||||
newMaxKeys++
|
||||
// If we have reached the maxKeys, it means we have listed
|
||||
// everything that was requested. Return right here.
|
||||
if newMaxKeys == maxKeys {
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// We reach here for a non-recursive case non-leaf entry
|
||||
@ -385,12 +391,12 @@ func listMetaBucketMultipartFiles(layer ObjectLayer, prefixPath string, markerPa
|
||||
fi.Name = path.Dir(fi.Name)
|
||||
}
|
||||
fileInfos = append(fileInfos, fi)
|
||||
}
|
||||
newMaxKeys++
|
||||
// If we have reached the maxKeys, it means we have listed
|
||||
// everything that was requested. Return right here.
|
||||
if newMaxKeys == maxKeys {
|
||||
return
|
||||
newMaxKeys++
|
||||
// If we have reached the maxKeys, it means we have listed
|
||||
// everything that was requested. Return right here.
|
||||
if newMaxKeys == maxKeys {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -398,6 +404,12 @@ func listMetaBucketMultipartFiles(layer ObjectLayer, prefixPath string, markerPa
|
||||
return fileInfos, eof, nil
|
||||
}
|
||||
|
||||
// FIXME: Currently the code sorts based on keyName/upload-id which is
|
||||
// in correct based on the S3 specs. According to s3 specs we are
|
||||
// supposed to only lexically sort keyNames and then for keyNames with
|
||||
// multiple upload ids should be sorted based on the initiated time.
|
||||
// Currently this case is not handled.
|
||||
|
||||
// listMultipartUploadsCommon - lists all multipart uploads, common
|
||||
// function for both object layers.
|
||||
func listMultipartUploadsCommon(layer ObjectLayer, bucket, prefix, keyMarker, uploadIDMarker, delimiter string, maxUploads int) (ListMultipartsInfo, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user