From 2e8b89e9e4bfe053cfb5d0fbee2395a8015e7f46 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Fri, 26 Sep 2008 15:49:13 -0700 Subject: [PATCH] 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) --- src/allmydata/test/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.45.2