protected call to open sidecar history file

This should fix #724.
This commit is contained in:
chrox
2014-07-15 10:14:52 +08:00
parent 6dfd0561ae
commit 3b25af4f4d

View File

@@ -135,10 +135,10 @@ function DocSettings:flush()
local serials = {}
if self.history_file then
table.insert(serials, io.open(self.history_file, "w"))
pcall(table.insert, serials, io.open(self.history_file, "w"))
end
if self.sidecar_file then
table.insert(serials, io.open(self.sidecar_file, "w"))
pcall(table.insert, serials, io.open(self.sidecar_file, "w"))
end
os.setlocale('C', 'numeric')
local out = {"-- we can read Lua syntax here!\nreturn "}