keplerproject/luarocks — Issue #50: fs\win32.lua has a bad regex
Author: bildzeitung
Created: 2011-11-04 18:05:35+00:00
State: open

Using luaJIT, the following error occurs on a load of luarocks:

```
error loading module 'luarocks.fs.win32' from file 'c:\build\LuaRocks\2.0\lua\luarocks\fs\win32.lua':
c:\build\LuaRocks\2.0\lua\luarocks\fs\win32.lua:19: invalid escape sequence near '"^['
```

The regex in question is:
```
-- Quote DIR for Windows
if arg:match("^[\.a-zA-Z]?:?[\\/]") then
return '"' .. arg:gsub("/", "\\"):gsub('"', '\\"') .. '"'
end
```

But ought to read, methinks:

```
-- Quote DIR for Windows
if arg:match("^[%.a-zA-Z]?:?[\\/]") then
return '"' .. arg:gsub("/", "\\"):gsub('"', '\\"') .. '"'
end
```