From 5b447997b8cf17fa1e48174a7ae76ed9215359e5 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 26 Feb 2010 15:49:26 +0200 Subject: 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. --- luaotfload-fonts.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3