Commit 85218866 authored by Antony Chazapis's avatar Antony Chazapis

Fix block updates.

Refs #2038
parent 41adaf4b
......@@ -610,7 +610,6 @@ class ObjectWrapper(object):
"""
def __init__(self, backend, ranges, sizes, hashmaps, boundary):
print '***', ranges, sizes, hashmaps, boundary
self.backend = backend
self.ranges = ranges
self.sizes = sizes
......
......@@ -164,8 +164,10 @@ class Blocker(object):
block = block[0]
newblock = block[:offset] + data
if len(block) >= blocksize:
if len(newblock) > blocksize:
newblock = newblock[:blocksize]
elif len(newblock) < blocksize:
newblock += block[len(newblock):]
h, a = self.block_stor((newblock,))
return h[0], 1 if a else 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment