diff options
author | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-14 16:07:58 +0200 |
---|---|---|
committer | Philipp Gesang <phg42.2a@gmail.com> | 2013-07-14 16:07:58 +0200 |
commit | af6b5d35884ba2f45b4b0220e7be88afde6a0009 (patch) | |
tree | 79046acbb85bfada16f8f0c2ea1941d02eb0f9d5 | |
parent | 5eb884d8fd73b5ddf1276f1aa408903712e78c51 (diff) | |
download | luaotfload-af6b5d35884ba2f45b4b0220e7be88afde6a0009.tar.gz |
fix path handling of luaotfload-tool on Win systems
-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 |