diff options
author | Karl Berry <karl@freefriends.org> | 2013-04-08 00:43:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-04-08 00:43:40 +0000 |
commit | 824f7b0903de8ad7f6ee3d7656005e4c59155e06 (patch) | |
tree | abfc8673ef9916f3ab7074e811207384c301492b /Master/texmf-dist/tex/context/base/file-res.lua | |
parent | 689aefb0727676ed3cddf331337b4be226495e72 (diff) |
context import for TL13, from www.pragma-ade.com/context/beta/cont-tmf.zip
git-svn-id: svn://tug.org/texlive/trunk@29731 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/file-res.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/file-res.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/file-res.lua b/Master/texmf-dist/tex/context/base/file-res.lua index 4687e140e4e..8e65ba4c7d1 100644 --- a/Master/texmf-dist/tex/context/base/file-res.lua +++ b/Master/texmf-dist/tex/context/base/file-res.lua @@ -1,4 +1,4 @@ -if not modules then modules = { } end modules ['supp-fil'] = { +if not modules then modules = { } end modules ['file-res'] = { version = 1.001, comment = "companion to supp-fil.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -8,6 +8,8 @@ if not modules then modules = { } end modules ['supp-fil'] = { local format = string.format local isfile = lfs.isfile +local is_qualified_path = file.is_qualified_path +local hasscheme = url.hasscheme local trace_files = false trackers.register("resolvers.readfile", function(v) trace_files = v end) local report_files = logs.reporter("files","readfile") @@ -35,7 +37,7 @@ local function readfilename(specification,backtrack,treetoo) names[i] = name .. "." .. defaultsuffixes[i] end if trace_files then - report_files("locating: %s, using default suffixes: %s",name,table.concat(defaultsuffixes," ")) + report_files("locating: %s, using default suffixes: %a",name,defaultsuffixes) end end for i=1,#names do @@ -76,9 +78,9 @@ local function readfilename(specification,backtrack,treetoo) local fname = paths[i] .. "/" .. names[i] if isfile(fname) then if trace_files then - report_files("found on extra path: %s",name) + report_files("found on extra path: %s",fname) end - fnd = name + fnd = fname break end end @@ -127,7 +129,7 @@ openers.any = openers.file loaders.any = loaders.file function getreadfilename(scheme,path,name) -- better do a split and then pass table local fullname - if url.hasscheme(name) then + if hasscheme(name) or is_qualified_path(name) then fullname = name else fullname = ((path == "") and format("%s:///%s",scheme,name)) or format("%s:///%s/%s",scheme,path,name) |