From af6b5d35884ba2f45b4b0220e7be88afde6a0009 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 14 Jul 2013 16:07:58 +0200 Subject: fix path handling of luaotfload-tool on Win systems --- luaotfload-tool.lua | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.3