From a3a4e7f7fbdcf7f5a55bb8c1a7c48b4f095682b6 Mon Sep 17 00:00:00 2001 From: chrox Date: Fri, 4 Jul 2014 01:41:24 +0800 Subject: [PATCH] fix dofile of nil filename --- frontend/docsettings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/docsettings.lua b/frontend/docsettings.lua index 9233548ef..a96de9f77 100644 --- a/frontend/docsettings.lua +++ b/frontend/docsettings.lua @@ -55,9 +55,9 @@ function DocSettings:open(docfile) sidecar_file = sidecar_path, data = {} } - local ok, stored = pcall(dofile, new.history_file) + local ok, stored = pcall(dofile, new.history_file or "") if not ok then - ok, stored = pcall(dofile, new.sidecar_file) + ok, stored = pcall(dofile, new.sidecar_file or "") if not ok then -- try legacy conf path, for backward compatibility. this also -- takes care of reader legacy setting