XL: CompleteMultipart should ignore last part is 0bytes. (#1931)

Fixes #1917
This commit is contained in:
Harshavardhana
2016-06-19 14:51:20 -07:00
committed by GitHub
parent 1ea1dba528
commit e1aad066c6
3 changed files with 29 additions and 9 deletions

View File

@@ -171,11 +171,6 @@ func (m xlMetaV1) ObjectToPartOffset(offset int64) (partIndex int, partOffset in
// Seek until object offset maps to a particular part offset.
for i, part := range m.Parts {
partIndex = i
// Last part can be of '0' bytes, treat it specially and
// return right here.
if part.Size == 0 {
return partIndex, partOffset, nil
}
// Offset is smaller than size we have reached the proper part offset.
if partOffset < part.Size {
return partIndex, partOffset, nil