From 78a1273715f8681fe8cb013b9699df11bfa56eaa Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 28 Nov 2015 14:58:19 +0100 Subject: [diagnose] adapt invocation of getwritablepath() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some upstream API change (possibly in file.join()) caused that function to emit relative paths. file.join("/foo", "bar") --> good file.join("/foo", "" ) --> good file.join("/foo" ) --> wtf‽ --- src/luaotfload-diagnostics.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/luaotfload-diagnostics.lua') diff --git a/src/luaotfload-diagnostics.lua b/src/luaotfload-diagnostics.lua index 582105a..cd5082c 100644 --- a/src/luaotfload-diagnostics.lua +++ b/src/luaotfload-diagnostics.lua @@ -171,6 +171,11 @@ local get_permissions = function (t, location) location = lpegmatch (stripslashes, location) end local attributes = lfsattributes (location) + if not attributes then + print"" + print("attr", location, attributes) + os.exit() + end if not attributes and t == "f" then attributes = get_tentative_attributes (location) @@ -238,12 +243,10 @@ local check_conformance = function (spec, permissions, errcnt) return errcnt end -local desired_permissions local init_desired_permissions = function () - inspect(config.luaotfload.paths) local paths = config.luaotfload.paths - desired_permissions = { - { "d", {"r","w"}, function () return caches.getwritablepath () end }, + return { + { "d", {"r","w"}, function () return caches.getwritablepath ("", "") end }, { "d", {"r","w"}, paths.prefix }, { "f", {"r","w"}, paths.index_path_lua .. ".gz" }, { "f", {"r","w"}, paths.index_path_luc }, @@ -254,7 +257,7 @@ end local check_permissions = function (errcnt) out [[=============== file permissions ==============]] - if not desired_permissions then init_desired_permissions () end + local desired_permissions = init_desired_permissions () for i = 1, #desired_permissions do local t, spec, path = unpack (desired_permissions[i]) if type (path) == "function" then -- cgit v1.2.3