Change FileCollectionStorage to not write 0 bytes to the next file at the end #73

Merged
merged 1 commit into from Nov 26, 2013

Conversation

Projects
None yet
2 participants
Contributor

a86c6f7964 commented Nov 25, 2013

Currently at the end of writing to a file it is likely that the offset+length will be equal to the next file offset. Usually while selecting files once we get to a file that is greater than our current offset+length we break out of the loop. I would consider the next file that has offset+length equal to the offset to be outside of the range that we should be writing to, so we should also break out for equals to.

@mpetazzoni mpetazzoni added a commit that referenced this pull request Nov 26, 2013

@mpetazzoni mpetazzoni Merge pull request #73 from a86c6f7964/collectionfileselect
Change FileCollectionStorage to not write 0 bytes to the next file at the end
186dbb3

@mpetazzoni mpetazzoni merged commit 186dbb3 into mpetazzoni:master Nov 26, 2013

Owner

mpetazzoni commented Nov 26, 2013

It took me a while to correctly understand what you were talking about. Not an easy topic to explain. But it looks fine.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment