summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/l-io.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/l-io.lua')
-rw-r--r--tex/context/base/mkiv/l-io.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/l-io.lua b/tex/context/base/mkiv/l-io.lua
index a955262a3..f72995abd 100644
--- a/tex/context/base/mkiv/l-io.lua
+++ b/tex/context/base/mkiv/l-io.lua
@@ -147,9 +147,12 @@ function io.copydata(source,target,action)
end
end
-function io.savedata(filename,data,joiner)
- local f = open(filename,"wb")
+function io.savedata(filename,data,joiner,append)
+ local f = open(filename,append and "ab" or "wb")
if f then
+ if append and joiner and f:seek("end") > 0 then
+ f:write(joiner)
+ end
if type(data) == "table" then
f:write(concat(data,joiner or ""))
elseif type(data) == "function" then