diff options
Diffstat (limited to 'luaotfload-tool.lua')
-rwxr-xr-x | luaotfload-tool.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/luaotfload-tool.lua b/luaotfload-tool.lua index 17978f8..21f73d1 100755 --- a/luaotfload-tool.lua +++ b/luaotfload-tool.lua @@ -1022,8 +1022,16 @@ do return lpegmatch (p_permissions, raw) end + local trailingslashes = P"/"^1 * P(-1) + local stripslashes = C((1 - trailingslashes)^0) + local get_permissions = function (t, location) + if stringsub (location, #location) == "/" then + --- strip trailing slashes (lfs idiosyncrasy on Win) + location = lpegmatch (stripslashes, location) + end local attributes = lfsattributes (location) + if not attributes and t == "f" then attributes = get_tentative_attributes (location) if not attributes then |