From df8d8a5e5ec4a3e885a6b15087fc283ee69ecf06 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Tue, 16 Apr 2013 09:40:52 +0200 Subject: Better error handling for font config reading The code is still quite experimental and sometimes generate errors while it could still continue. --- otfl-font-nms.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'otfl-font-nms.lua') diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua index f6d6a6e..4271b3c 100644 --- a/otfl-font-nms.lua +++ b/otfl-font-nms.lua @@ -522,7 +522,7 @@ local function read_fonts_conf(path, results) ]] local f = io.open(path) if not f then - error("Cannot open the file "..path) + return results end local incomments = false for line in f:lines() do @@ -571,7 +571,7 @@ local function read_fonts_conf(path, results) elseif not lfs.isfile(include) and not lfs.isdir(include) then include = file.join(file.dirname(path), include) end - if lfs.isfile(include) then + if lfs.isfile(include) and kpse.readable_file(include) then -- maybe we should prevent loops here? -- we exclude path with texmf in them, as they should -- be found otherwise -- cgit v1.2.3