projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b49986f
)
mutable/filenode.py: don't fetch more segments than necesasry to update the file
author
Kevan Carstensen
<kevan@isnotajoke.com>
Sat, 13 Aug 2011 21:00:05 +0000
(14:00 -0700)
committer
Kevan Carstensen
<kevan@isnotajoke.com>
Sat, 13 Aug 2011 21:00:05 +0000
(14:00 -0700)
src/allmydata/mutable/filenode.py
patch
|
blob
|
history
diff --git
a/src/allmydata/mutable/filenode.py
b/src/allmydata/mutable/filenode.py
index 1d2f2692fcd8c525cf14592edffe7e24f7392d5c..e798a58970b42ac7b633d92f1ca566b417f98bfe 100644
(file)
--- a/
src/allmydata/mutable/filenode.py
+++ b/
src/allmydata/mutable/filenode.py
@@
-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