From e7672838ac65bb90f509fbf435f445b860fb4037 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 29 Sep 2011 15:36:20 -0300 Subject: Appease stricter escaping rules from Lua 5.2, Metalua and the current LuaJIT2 beta 8. Closes #48. --- src/luarocks/fs/win32.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua index 44740850..d419ea23 100644 --- a/src/luarocks/fs/win32.lua +++ b/src/luarocks/fs/win32.lua @@ -33,7 +33,9 @@ function absolute_name(pathname, relative_to) assert(type(relative_to) == "string" or not relative_to) relative_to = relative_to or fs.current_dir() - if pathname:match("^[\.a-zA-Z]?:?[\\/]") then + -- FIXME I'm not sure this first \\ should be there at all. + -- What are the Windows rules for drive letters? + if pathname:match("^[\\.a-zA-Z]?:?[\\/]") then return pathname else return relative_to .. "/" .. pathname -- cgit v1.2.3-55-g6feb