Handle multiple of MAX_BLOCK_SIZE for Azure MPU

Currently files are not properly uploaded if they are a multiple of
MAX_BLOCK_SIZE.  Fixes JCLOUDS-233.
This commit is contained in:
Tom Manville 2013-08-05 20:50:42 -07:00 committed by Andrew Gaul
parent 96c326d0cd
commit 19f79145fc
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ public class AzureBlobBlockUploadStrategy implements MultipartUploadStrategy {
while (offset < length) {
blockCount++;
long chunkSize = MAX_BLOCK_SIZE;
if (blockCount >= totalBlocks) {
if (length - offset < MAX_BLOCK_SIZE) {
chunkSize = length % MAX_BLOCK_SIZE;
}
bytesWritten += chunkSize;