mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
fix bug in storage-server: yes, "0" is a number, Mr. storage server
This commit is contained in:
parent
466bb46abe
commit
826ce43be7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user