mirror of
https://github.com/apache/jclouds.git
synced 2025-03-01 05:49:06 +00:00
JCLOUDS-894: Handle part size when > maximum
Azure has a small part size that was not handled by the existing logic. This code is twisty and confusing and should be rewritten!
This commit is contained in:
parent
65b7bdf282
commit
7d7deefb75
@ -93,6 +93,11 @@ public final class MultipartUploadSlicingAlgorithm {
|
||||
parts = (int)(length / partSize);
|
||||
}
|
||||
}
|
||||
if (partSize > maximumPartSize) {
|
||||
partSize = maximumPartSize;
|
||||
unitPartSize = maximumPartSize;
|
||||
parts = (int)(length / unitPartSize);
|
||||
}
|
||||
if (parts > maximumNumberOfParts) { // if splits in too many parts or
|
||||
// cannot be split
|
||||
unitPartSize = minimumPartSize; // take the minimum part size
|
||||
|
Loading…
x
Reference in New Issue
Block a user