diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-12 23:01:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-12 23:01:17 +0000 |
commit | 879e67d4e530cd1a38e1a80a4f779dacd44636dc (patch) | |
tree | 00d16b7e64cd3717ad4e16a024e00b47cc549496 /Master/texmf-dist/tex/context/base/data-tmp.lua | |
parent | 512547ff22232693018f59e34d48351f031c4c33 (diff) |
context (size 11122862, Apr 11 19:56)
git-svn-id: svn://tug.org/texlive/trunk@29878 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/data-tmp.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/data-tmp.lua | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/data-tmp.lua b/Master/texmf-dist/tex/context/base/data-tmp.lua index 525698d1e86..5025a8a0ad8 100644 --- a/Master/texmf-dist/tex/context/base/data-tmp.lua +++ b/Master/texmf-dist/tex/context/base/data-tmp.lua @@ -23,7 +23,7 @@ luatools with a recache feature.</p> --ldx]]-- local format, lower, gsub, concat = string.format, string.lower, string.gsub, table.concat -local serialize, serializetofile = table.serialize, table.tofile +local concat, serialize, serializetofile = table.concat, table.serialize, table.tofile local mkdirs, isdir, isfile = dir.mkdirs, lfs.isdir, lfs.isfile local addsuffix, is_writable, is_readable = file.addsuffix, file.is_writable, file.is_readable local formatters = string.formatters @@ -163,20 +163,27 @@ local function identify() return writable, readables end -function caches.usedpaths() +function caches.usedpaths(separator) local writable, readables = identify() if #readables > 1 then local result = { } + local done = { } for i=1,#readables do local readable = readables[i] - if usedreadables[i] or readable == writable then - result[#result+1] = formatters["readable: %a (order %s)"](readable,i) + if readable == writable then + done[readable] = true + result[#result+1] = formatters["readable+writable: %a"](readable) + elseif usedreadables[i] then + done[readable] = true + result[#result+1] = formatters["readable: %a"](readable) end end - result[#result+1] = formatters["writable: %a"](writable) - return result + if not done[writable] then + result[#result+1] = formatters["writable: %a"](writable) + end + return concat(result,separator or " | ") else - return writable + return writable or "?" end end |