summaryrefslogtreecommitdiff
path: root/luaotfload-fonts.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-02-26 15:49:26 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-02-26 15:49:26 +0200
commit5b447997b8cf17fa1e48174a7ae76ed9215359e5 (patch)
tree364cbd58e278792872dc90a71e095c382a840e64 /luaotfload-fonts.lua
parent0b99d9ec4dd253721ca4dc29af6d95a65975da56 (diff)
downloadluaotfload-5b447997b8cf17fa1e48174a7ae76ed9215359e5.tar.gz
Open the file in append mode
So that the old file content is not erased, right now if the script ended unexpectedly, we are left with an empty file.
Diffstat (limited to 'luaotfload-fonts.lua')
-rw-r--r--luaotfload-fonts.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/luaotfload-fonts.lua b/luaotfload-fonts.lua
index 9a59681..61d91e3 100644
--- a/luaotfload-fonts.lua
+++ b/luaotfload-fonts.lua
@@ -355,7 +355,7 @@ local function reload(force)
end
end
savepath = savepath .. '/' .. luaotfload.fonts.basename
- local fh = io.open(savepath, 'wb')
+ local fh = io.open(savepath, 'a+')
if not fh then
texio.write_nl(string.format("Error: cannot write file '%s', exiting.\n", savepath))
os.exit(1)