diff options
author | Marius <mariausol@gmail.com> | 2011-01-31 18:40:12 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-01-31 18:40:12 +0200 |
commit | 8f0a9674137499392552a70d470f614f0eb98b6c (patch) | |
tree | 6d67600678dc90e269c2800f9609e78f307254a1 /tex/context/base/data-tmp.lua | |
parent | cf65f174d2b790545f27134a5d41d39c942a1d5b (diff) | |
download | context-8f0a9674137499392552a70d470f614f0eb98b6c.tar.gz |
beta 2011.01.31 16:59
Diffstat (limited to 'tex/context/base/data-tmp.lua')
-rw-r--r-- | tex/context/base/data-tmp.lua | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/tex/context/base/data-tmp.lua b/tex/context/base/data-tmp.lua index 5ed6e4e1c..5304c0a24 100644 --- a/tex/context/base/data-tmp.lua +++ b/tex/context/base/data-tmp.lua @@ -48,16 +48,17 @@ end -- end of intermezzo -caches = caches or { } -local caches = caches - -caches.base = caches.base or "luatex-cache" -caches.more = caches.more or "context" -caches.direct = false -- true is faster but may need huge amounts of memory -caches.tree = false -caches.force = true -caches.ask = false -caches.defaults = { "TMPDIR", "TEMPDIR", "TMP", "TEMP", "HOME", "HOMEPATH" } +caches = caches or { } +local caches = caches + +caches.base = caches.base or "luatex-cache" +caches.more = caches.more or "context" +caches.direct = false -- true is faster but may need huge amounts of memory +caches.tree = false +caches.force = true +caches.ask = false +caches.relocate = false +caches.defaults = { "TMPDIR", "TEMPDIR", "TMP", "TEMP", "HOME", "HOMEPATH" } local writable, readables, usedreadables = nil, { }, { } @@ -177,7 +178,14 @@ function caches.configfiles() end function caches.hashed(tree) - return md5.hex(gsub(lower(tree),"[\\\/]+","/")) + tree = gsub(tree,"\\$","/") + tree = gsub(tree,"/+$","") + tree = lower(tree) + local hash = md5.hex(tree) + if trace_cache or trace_locating then + report_cache("hashing tree %s, hash %s",tree,hash) + end + return hash end function caches.treehash() |