diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/file-res.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/file-res.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/file-res.lua b/Master/texmf-dist/tex/context/base/mkiv/file-res.lua index 16afae4c7ab..3ed7abc8d3d 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/file-res.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/file-res.lua @@ -59,18 +59,20 @@ local function readfilename(specification,backtrack,treetoo) end end if not fnd and backtrack then + local path = environment.arguments.runpath and environment.arguments.path or "" for i=1,#names do local fname = names[i] for i=1,backtrack,1 do fname = "../" .. fname - if isfile(fname) then + local pname = path and (path ~= "") and (path .. "/" .. fname) or fname + if isfile(pname) then if trace_files then - report_files("found by backtracking: %s",fname) + report_files("found by backtracking: %s",pname) end - fnd = fname + fnd = pname break elseif trace_files then - report_files("not found by backtracking: %s",fname) + report_files("not found by backtracking: %s",pname) end end if fnd then |