]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
don't clobber existing storefile every put block
authorZooko O'Whielacronx <zooko@zooko.com>
Wed, 18 Apr 2007 03:14:44 +0000 (20:14 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Wed, 18 Apr 2007 03:14:44 +0000 (20:14 -0700)
src/allmydata/storageserver.py

index 1cdea75aff56cb48beb341bf7f5d8d135701e501..67def3680c557f0b1f251eaed50705cb56aee0a5 100644 (file)
@@ -42,7 +42,7 @@ class BucketWriter(Referenceable):
         # last one may be short, and we don't know the total number of
         # segments so we can't tell which is which.
         assert len(data) <= self.blocksize
-        f = open(os.path.join(self.incominghome, 'data'), 'wb')
+        f = fileutil.open_or_create(os.path.join(self.incominghome, 'data'))
         f.seek(self.blocksize*segmentnum)
         f.write(data)