diff options
-rw-r--r-- | src/luaotfload-database.lua | 2 | ||||
-rwxr-xr-x | src/luaotfload-tool.lua | 17 |
2 files changed, 11 insertions, 8 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua index 35450b5..881cfe8 100644 --- a/src/luaotfload-database.lua +++ b/src/luaotfload-database.lua @@ -3414,7 +3414,7 @@ end local getwritablecachepath = function ( ) --- fonts.handlers.otf doesn’t exist outside a Luatex run, --- so we have to improvise - local writable = getwritablepath (config.luaotfload.paths.cache_dir) + local writable = getwritablepath (config.luaotfload.paths.cache_dir, "") if writable then return writable end diff --git a/src/luaotfload-tool.lua b/src/luaotfload-tool.lua index ab025b3..ab495a9 100755 --- a/src/luaotfload-tool.lua +++ b/src/luaotfload-tool.lua @@ -858,7 +858,7 @@ end --- bisect mode ------------------------------------------------------------------------------- -local bisect_status_path = caches.getwritablepath "bisect" +local bisect_status_path = caches.getwritablepath ("bisect", "") local bisect_status_file = bisect_status_path .."/" .. "luaotfload-bisect-status.lua" local bisect_status_fmt = [[ --[==[------------------------------------------------------------------------- @@ -1174,14 +1174,17 @@ actions.flush = function (job) return false, false end -local cache_directives = { - ["purge"] = fonts.names.purge_cache, - ["erase"] = fonts.names.erase_cache, - ["show"] = fonts.names.show_cache, -} +local cache_directives = function () + --- These exist only after initialization. + return { + ["purge"] = fonts.names.purge_cache, + ["erase"] = fonts.names.erase_cache, + ["show"] = fonts.names.show_cache, + } +end actions.cache = function (job) - local directive = cache_directives[job.cache] + local directive = cache_directives()[job.cache] if not directive or type(directive) ~= "function" then logreport ("info", 2, "cache", "Invalid font cache directive %s.", job.cache) |