diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-08-25 14:22:28 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-08-25 14:22:28 +0200 |
commit | acf69d3d7873025941544add3ba168b367c84edd (patch) | |
tree | 66268d2e0ba30460f8e76ea886d8060646c8be19 /tex/context/base/mkiv/file-lib.lua | |
parent | b37069abc236fbc5fbf171dc6af0deff495a6baf (diff) | |
download | context-acf69d3d7873025941544add3ba168b367c84edd.tar.gz |
2016-08-25 14:18:00
Diffstat (limited to 'tex/context/base/mkiv/file-lib.lua')
-rw-r--r-- | tex/context/base/mkiv/file-lib.lua | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tex/context/base/mkiv/file-lib.lua b/tex/context/base/mkiv/file-lib.lua index b8ba69427..62cf938ba 100644 --- a/tex/context/base/mkiv/file-lib.lua +++ b/tex/context/base/mkiv/file-lib.lua @@ -48,12 +48,7 @@ function resolvers.uselibrary(specification) -- todo: reporter end for i=1,#files do local filename = files[i] - if loaded[filename] then - -- next one - else - if onlyonce then - loaded[filename] = true -- todo: base this on return value - end + if not loaded[filename] then local foundname = nil local barename = removesuffix(filename) -- direct search (we have an explicit suffix) @@ -76,10 +71,18 @@ function resolvers.uselibrary(specification) -- todo: reporter end end end - if foundname then - action(name,foundname) - elseif failure then - failure(name) + if not loaded[foundname] then + if foundname then + action(name,foundname) + if onlyonce then + loaded[foundname] = true -- todo: base this on return value + end + elseif failure then + failure(name) + end + if onlyonce then + loaded[filename] = true -- todo: base this on return value + end end end end |