From c2dfcb1f01288ac4fe90c9afab120f93baf4fa41 Mon Sep 17 00:00:00 2001
From: Zooko O'Whielacronx <zooko@zooko.com>
Date: Tue, 17 Apr 2007 20:14:44 -0700
Subject: [PATCH] don't clobber existing storefile every put block

---
 src/allmydata/storageserver.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
 
-- 
2.45.2