summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/data-res.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/data-res.lua')
-rw-r--r--tex/context/base/mkiv/data-res.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/tex/context/base/mkiv/data-res.lua b/tex/context/base/mkiv/data-res.lua
index f3b76778f..15d9f3db9 100644
--- a/tex/context/base/mkiv/data-res.lua
+++ b/tex/context/base/mkiv/data-res.lua
@@ -1839,10 +1839,10 @@ function resolvers.dowithvariable(name,func)
end
function resolvers.locateformat(name)
- local engine = environment.ownmain or "luatex"
- local barename = removesuffix(name)
+ local engine = environment.ownmain or "luatex"
+ local barename = removesuffix(file.basename(name))
local fullname = addsuffix(barename,"fmt")
- local fmtname = caches.getfirstreadablefile(fullname,"formats",engine) or ""
+ local fmtname = caches.getfirstreadablefile(fullname,"formats",engine) or ""
if fmtname == "" then
fmtname = resolvers.findfile(fullname)
fmtname = cleanpath(fmtname)
@@ -1853,11 +1853,11 @@ function resolvers.locateformat(name)
local lucname = addsuffix(barename,luasuffixes.luc)
local luiname = addsuffix(barename,luasuffixes.lui)
if isfile(luiname) then
- return barename, luiname
+ return fmtname, luiname
elseif isfile(lucname) then
- return barename, lucname
+ return fmtname, lucname
elseif isfile(luaname) then
- return barename, luaname
+ return fmtname, luaname
end
end
return nil, nil