summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-04-16 09:40:52 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-04-16 09:40:52 +0200
commitdf8d8a5e5ec4a3e885a6b15087fc283ee69ecf06 (patch)
tree3a13c5a69dfe0e24cb03bcf39fa54748b32bb9f5
parent431f4094833c4d24259d655815a492976602b0df (diff)
downloadluaotfload-df8d8a5e5ec4a3e885a6b15087fc283ee69ecf06.tar.gz
Better error handling for font config reading
The code is still quite experimental and sometimes generate errors while it could still continue.
-rw-r--r--otfl-font-nms.lua4
1 files changed, 2 insertions, 2 deletions
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