summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2016-01-30 22:35:38 (GMT)
committerThomas Tanner <trtanner@btinternet.com>2016-01-30 22:35:38 (GMT)
commita88dd02a03343dd0a0e17f6ad589148bf77d0493 (patch)
tree45b4fbf27d5f1f074ba8b343378303513784225c /src/engine/SCons
parentb7bf26899595e90e1cc6937fb18fd5702bec8d8d (diff)
downloadSCons-a88dd02a03343dd0a0e17f6ad589148bf77d0493.zip
SCons-a88dd02a03343dd0a0e17f6ad589148bf77d0493.tar.gz
SCons-a88dd02a03343dd0a0e17f6ad589148bf77d0493.tar.bz2
Change the cache to use the first two characters of the md5 for the directory
name (more smaller directories, because they tend to get huge otherwise)
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/CacheDir.py2
-rw-r--r--src/engine/SCons/CacheDirTests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/engine/SCons/CacheDir.py b/src/engine/SCons/CacheDir.py
index 3b7d06f..be0163d 100644
--- a/src/engine/SCons/CacheDir.py
+++ b/src/engine/SCons/CacheDir.py
@@ -164,7 +164,7 @@ class CacheDir(object):
return None, None
sig = node.get_cachedir_bsig()
- subdir = sig[0].upper()
+ subdir = sig[:2].upper()
dir = os.path.join(self.path, subdir)
return dir, os.path.join(dir, sig)
diff --git a/src/engine/SCons/CacheDirTests.py b/src/engine/SCons/CacheDirTests.py
index 7ac97ef..3b99d41 100644
--- a/src/engine/SCons/CacheDirTests.py
+++ b/src/engine/SCons/CacheDirTests.py
@@ -100,7 +100,7 @@ class CacheDirTestCase(BaseTestCase):
try:
f5 = self.File("cd.f5", 'a_fake_bsig')
result = self._CacheDir.cachepath(f5)
- dirname = os.path.join('cache', 'A')
+ dirname = os.path.join('cache', 'A_')
filename = os.path.join(dirname, 'a_fake_bsig')
assert result == (dirname, filename), result
finally: