Revision 45cf0bc8
b/snf-pithos-app/pithos/api/util.py | ||
---|---|---|
661 | 661 |
# Get the data from the block. |
662 | 662 |
bo = self.offset % self.backend.block_size |
663 | 663 |
bs = self.backend.block_size |
664 |
if self.block_index == len(self.hashmaps[self.file_index]) - 1: |
|
664 |
if (self.block_index == len(self.hashmaps[self.file_index]) - 1 and |
|
665 |
self.sizes[self.file_index] % self.backend.block_size): |
|
665 | 666 |
bs = self.sizes[self.file_index] % self.backend.block_size |
666 | 667 |
bl = min(self.length, bs - bo) |
667 | 668 |
data = self.block[bo:bo + bl] |
Also available in: Unified diff