diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-09-29 15:36:20 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-09-29 15:36:20 -0300 |
commit | e7672838ac65bb90f509fbf435f445b860fb4037 (patch) | |
tree | e5be4598a809006ee63b9ab3084bc72fc0b4760e | |
parent | b82a2cc2d1dd88d28000a2ed10f297a5b2a164b4 (diff) | |
download | luarocks-e7672838ac65bb90f509fbf435f445b860fb4037.tar.gz luarocks-e7672838ac65bb90f509fbf435f445b860fb4037.tar.bz2 luarocks-e7672838ac65bb90f509fbf435f445b860fb4037.zip |
Appease stricter escaping rules from Lua 5.2, Metalua and the current LuaJIT2 beta 8. Closes #48.
-rw-r--r-- | src/luarocks/fs/win32.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
33 | assert(type(relative_to) == "string" or not relative_to) | 33 | assert(type(relative_to) == "string" or not relative_to) |
34 | 34 | ||
35 | relative_to = relative_to or fs.current_dir() | 35 | relative_to = relative_to or fs.current_dir() |
36 | if pathname:match("^[\.a-zA-Z]?:?[\\/]") then | 36 | -- FIXME I'm not sure this first \\ should be there at all. |
37 | -- What are the Windows rules for drive letters? | ||
38 | if pathname:match("^[\\.a-zA-Z]?:?[\\/]") then | ||
37 | return pathname | 39 | return pathname |
38 | else | 40 | else |
39 | return relative_to .. "/" .. pathname | 41 | return relative_to .. "/" .. pathname |