summaryrefslogtreecommitdiff
path: root/tex/context/base/publ-dat.lua
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2015-10-04 20:15:06 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2015-10-04 20:15:06 +0200
commitd81d584da5152af05c07f7842054a926aae20e10 (patch)
tree9e15be94f1f8d05cccdbd575d4d5f0bac8cad221 /tex/context/base/publ-dat.lua
parentc9ac836b7b44d49c623ad8052639ca7beeaf1311 (diff)
downloadcontext-d81d584da5152af05c07f7842054a926aae20e10.tar.gz
2015-10-04 19:27:00
Diffstat (limited to 'tex/context/base/publ-dat.lua')
-rw-r--r--tex/context/base/publ-dat.lua22
1 files changed, 17 insertions, 5 deletions
diff --git a/tex/context/base/publ-dat.lua b/tex/context/base/publ-dat.lua
index e9cf22604..b34a99bc8 100644
--- a/tex/context/base/publ-dat.lua
+++ b/tex/context/base/publ-dat.lua
@@ -908,12 +908,16 @@ do
return v
end)
+ local done = setmetatableindex("table")
+
function publications.load(specification)
- local current = datasets[specification.dataset or v_default]
+ local name = specification.dataset or v_default
+ local current = datasets[name]
local files = settings_to_array(specification.filename)
local kind = specification.kind
local dataspec = specification.specification
statistics.starttiming(publications)
+ local somedone = false
for i=1,#files do
local filetype, filename = string.splitup(files[i],"::")
if not filename then
@@ -927,7 +931,13 @@ do
if file.suffix(filename) == "" then
file.addsuffix(filename,filetype)
end
- loaders[filetype](current,filename)
+ if done[current][filename] then
+ report("file %a is already loaded in dataset %a",filename,name)
+ else
+ loaders[filetype](current,filename)
+ done[current][filename] = true
+ somedone = true
+ end
if kind then
current.loaded[current.fullname or filename] = kind
end
@@ -936,9 +946,11 @@ do
end
end
end
- local runner = enhancer.runner
- if runner then
- runner(current)
+ if somedone then
+ local runner = enhancer.runner
+ if runner then
+ runner(current)
+ end
end
statistics.stoptiming(publications)
return current