From 9fceb52298c05c31666521b4226362322b18c178 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 27 Apr 2013 18:26:21 +0200 Subject: update fontconfig test --- luaotfload-database.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'luaotfload-database.lua') diff --git a/luaotfload-database.lua b/luaotfload-database.lua index edc3a5b..3085b63 100644 --- a/luaotfload-database.lua +++ b/luaotfload-database.lua @@ -86,12 +86,19 @@ config.luaotfload.resolver = config.luaotfload.resolver or "normal" -- We use the cache.* of ConTeXt (see luat-basics-gen), we can -- use it safely (all checks and directory creations are already done). It -- uses TEXMFCACHE or TEXMFVAR as starting points. -local writable_path = caches.getwritablepath("names","") -if not writable_path then - error("Impossible to find a suitable writeable cache...") +local writable_path +if caches then + writable_path = caches.getwritablepath("names","") + if not writable_path then + error("Impossible to find a suitable writeable cache...") + end + names.path.dir = writable_path + names.path.path = filejoin(writable_path, names.path.basename) +else --- running as script, inject some dummies + caches = { } + logs = { report = function () end } end -names.path.dir = writable_path -names.path.path = filejoin(writable_path, names.path.basename) + --[[doc-- Auxiliary functions -- cgit v1.2.3