build: fix problems found with unconvert

This commit is contained in:
Nick Craig-Wood
2019-01-11 17:17:46 +00:00
parent a551978a3f
commit d966cef14c
19 changed files with 29 additions and 29 deletions

View File

@@ -143,7 +143,7 @@ func (u *uploader) init() {
// Try to adjust partSize if it is too small and account for
// integer division truncation.
if u.totalSize/u.cfg.partSize >= int64(u.cfg.partSize) {
if u.totalSize/u.cfg.partSize >= u.cfg.partSize {
// Add one to the part size to account for remainders
// during the size calculation. e.g odd number of bytes.
u.cfg.partSize = (u.totalSize / int64(u.cfg.maxUploadParts)) + 1