diff options
author | Hans Hagen <pragma@wxs.nl> | 2022-12-27 21:56:16 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2022-12-27 21:56:16 +0100 |
commit | db25374e65d39dc254ddce11b40ad4a95e6a385b (patch) | |
tree | 9e0c569395847f1db266ea0e80660e8680d26318 /tex/context/base/mkxl/mlib-fio.lmt | |
parent | 32ca60de005df4b45e8904ab63e0e03978331c6f (diff) | |
download | context-db25374e65d39dc254ddce11b40ad4a95e6a385b.tar.gz |
2022-12-27 21:04:00
Diffstat (limited to 'tex/context/base/mkxl/mlib-fio.lmt')
-rw-r--r-- | tex/context/base/mkxl/mlib-fio.lmt | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tex/context/base/mkxl/mlib-fio.lmt b/tex/context/base/mkxl/mlib-fio.lmt index e4db28cea..07c9275be 100644 --- a/tex/context/base/mkxl/mlib-fio.lmt +++ b/tex/context/base/mkxl/mlib-fio.lmt @@ -9,7 +9,8 @@ if not modules then modules = { } end modules ['mlib-fio'] = { local type = type local find = string.find local concat = table.concat -local suffix, addsuffix = file.suffix, file.addsuffix +local suffix, addsuffix, is_writable = file.suffix, file.addsuffix, file.is_writable +local urlhashed = url.hashed local findfile = resolvers.findfile local mplibnew = mplib.new @@ -90,7 +91,7 @@ end -- finders.file = function(specification,name,mode,kind) -- if mode == "r" then -- return findmpfile(name,kind) --- elseif file.is_writable(name) then +-- elseif is_writable(name) then -- return name -- else -- return nil @@ -102,7 +103,7 @@ end -- finders.file = function(specification,name,mode,kind) -- if not mode or mode == "r" then -- return findmpfile(name,kind) --- elseif file.is_writable(name) then +-- elseif is_writable(name) then -- return name -- else -- return nil @@ -113,14 +114,14 @@ end finders.file = function(specification,name,mode,kind) if mode == "w" then - return file.is_writable(name) and name or nil + return is_writable(name) and name or nil else return findmpfile(name,kind) or nil end end local function finder(name,mode,kind) -- fake message for mpost.map and metafun.mpvi - local specification = url.hashed(name) + local specification = urlhashed(name) local finder = finders[specification.scheme] or finders.file local found = finder(specification,name,mode,validftype(ftype)) return found |