summaryrefslogtreecommitdiff
path: root/tex/context/base/data-tmp.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-01-31 16:59:00 +0100
committerHans Hagen <pragma@wxs.nl>2011-01-31 16:59:00 +0100
commita54b055aa4688508e8f0806eb5f776b353fbb03b (patch)
treee853e3c7e8fcd3798aa974b493b2febd1594bace /tex/context/base/data-tmp.lua
parentd537da741abd9c53eae3c2de8c1df68e448be2f0 (diff)
downloadcontext-a54b055aa4688508e8f0806eb5f776b353fbb03b.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.lua30
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()