mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 02:01:31 +00:00
mutable/filenode.py: don't fetch more segments than necesasry to update the file
This commit is contained in:
parent
b49986f801
commit
62c72881bb
@ -1114,6 +1114,9 @@ class MutableFileVersion:
|
||||
end_segment = start_segment
|
||||
if offset + data.get_size() < self.get_size():
|
||||
end_data = offset + data.get_size()
|
||||
# The last byte we touch is the end_data'th byte, which is actually
|
||||
# byte end_data - 1 because bytes are zero-indexed.
|
||||
end_data -= 1
|
||||
end_segment = end_data // segsize
|
||||
|
||||
self._start_segment = start_segment
|
||||
|
Loading…
x
Reference in New Issue
Block a user