Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

Commit

Permalink
JCLOUDS-894: Handle part size when > maximum
Browse files Browse the repository at this point in the history
Azure has a small part size that was not handled by the existing
logic.  This code is twisty and confusing and should be rewritten!
  • Loading branch information
gaul committed Jul 10, 2015
1 parent 65b7bdf commit 7d7deef
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -93,6 +93,11 @@ public long calculateChunkSize(long length) {
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
Expand Down

0 comments on commit 7d7deef

Please sign in to comment.