From 3b25af4f4d341b24510324941c33b0c7dea85bef Mon Sep 17 00:00:00 2001 From: chrox Date: Tue, 15 Jul 2014 10:14:52 +0800 Subject: [PATCH] protected call to open sidecar history file This should fix #724. --- frontend/docsettings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/docsettings.lua b/frontend/docsettings.lua index a96de9f77..e094712d0 100644 --- a/frontend/docsettings.lua +++ b/frontend/docsettings.lua @@ -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 "}