From: Zooko O'Whielacronx Date: Wed, 18 Apr 2007 03:14:44 +0000 (-0700) Subject: don't clobber existing storefile every put block X-Git-Tag: tahoe_v0.1.0-0-UNSTABLE~79 X-Git-Url: https://git.rkrishnan.org/pf/content/en/%3C?a=commitdiff_plain;h=c2dfcb1f01288ac4fe90c9afab120f93baf4fa41;p=tahoe-lafs%2Ftahoe-lafs.git don't clobber existing storefile every put block --- diff --git a/src/allmydata/storageserver.py b/src/allmydata/storageserver.py index 1cdea75a..67def368 100644 --- a/src/allmydata/storageserver.py +++ b/src/allmydata/storageserver.py @@ -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)