]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
fix bug in storage-server: yes, "0" is a number, Mr. storage server
authorZooko O'Whielacronx <zooko@zooko.com>
Sat, 31 Mar 2007 00:07:04 +0000 (17:07 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Sat, 31 Mar 2007 00:07:04 +0000 (17:07 -0700)
src/allmydata/storageserver.py

index 23d3ece6778425438bd5dfc6f11f08e6fb265d31..764ba32b953a6a913ade36d49c999b9d78c758e0 100644 (file)
@@ -19,7 +19,7 @@ from allmydata.util.assertutil import _assert, precondition
 # store/$VERIFIERID/$SHARENUM/sharehashtree
 
 # $SHARENUM matches this regex:
-NUM_RE=re.compile("[1-9][0-9]*")
+NUM_RE=re.compile("[0-9]*")
 
 class BucketWriter(Referenceable):
     implements(RIBucketWriter)
@@ -117,6 +117,6 @@ class StorageServer(service.MultiService, Referenceable):
         bucketreaders = {} # k: sharenum, v: BucketReader
         verifierdir = os.path.join(self.storedir, idlib.b2a(verifierid))
         for f in os.listdir(verifierdir):
-            _assert(NUM_RE.match(f))
+            _assert(NUM_RE.match(f), f)
             bucketreaders[int(f)] = BucketReader(os.path.join(verifierdir, f))
         return bucketreaders