Skip to content

Commit

Permalink
fix byte range
Browse files Browse the repository at this point in the history
  • Loading branch information
divyam234 committed Nov 8, 2023
1 parent ceafaf8 commit dfea832
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ func rangedParts(parts []types.Part, startByte, endByte int64) []types.Part {
// Add valid parts from any chunks in between.
for i := firstChunk + 1; i < lastChunk; i++ {
validParts = append(validParts, types.Part{
Location: parts[firstChunk].Location,
Location: parts[i].Location,
Start: 0,
End: parts[firstChunk].End,
End: parts[i].End,
})
}

// Add valid parts from the last chunk.
validParts = append(validParts, types.Part{
Location: parts[firstChunk].Location,
Location: parts[lastChunk].Location,
Start: 0,
End: endInLastChunk,
})
Expand Down

0 comments on commit dfea832

Please sign in to comment.