From: Zooko O'Whielacronx Date: Fri, 26 Sep 2008 22:49:13 +0000 (-0700) Subject: repair: fix test to map from storage index to directory structure properly (thanks... X-Git-Url: https://git.rkrishnan.org/vdrive/configuration.txt?a=commitdiff_plain;h=2e8b89e9e4bfe053cfb5d0fbee2395a8015e7f46;p=tahoe-lafs%2Ftahoe-lafs.git repair: fix test to map from storage index to directory structure properly (thanks, cygwin buildbot, for being so kloodgey that you won't accept random binary filenames and thus making me notice this bug) --- diff --git a/src/allmydata/test/common.py b/src/allmydata/test/common.py index 4486a573..da9bb766 100644 --- a/src/allmydata/test/common.py +++ b/src/allmydata/test/common.py @@ -14,6 +14,7 @@ from allmydata.immutable.encode import NotEnoughSharesError from allmydata.checker_results import CheckerResults, CheckAndRepairResults, \ DeepCheckResults, DeepCheckAndRepairResults from allmydata.mutable.common import CorruptShareError +from allmydata.storage import storage_index_to_dir from allmydata.util import log, testutil, fileutil from allmydata.stats import PickleStatsGatherer from allmydata.key_generator import KeyGeneratorService @@ -845,7 +846,7 @@ class ShareManglingMixin(SystemTestMixin): os.unlink(pathtosharefile) for ((clientnum, sharenum), newdata) in newshares.iteritems(): if clientnum == i: - fullsharedirp=os.path.join(sharedir, storage_index[:2], storage_index) + fullsharedirp=os.path.join(sharedir, storage_index_to_dir(storage_index)) fileutil.make_dirs(fullsharedirp) wf = open(os.path.join(fullsharedirp, str(sharenum)), "w") wf.write(newdata)