]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
repair: fix test to map from storage index to directory structure properly (thanks...
authorZooko O'Whielacronx <zooko@zooko.com>
Fri, 26 Sep 2008 22:49:13 +0000 (15:49 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Fri, 26 Sep 2008 22:49:13 +0000 (15:49 -0700)
src/allmydata/test/common.py

index 4486a5736769d957c7c1e46a1c54220e1739c21a..da9bb7660b98c93bcb8f3af331727fda4e71ea86 100644 (file)
@@ -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)