diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fs/lua.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index b2619051..b3d3f6f1 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua | |||
@@ -732,7 +732,7 @@ function fs_lua.chmod(file, mode) | |||
732 | -- LuaPosix (as of 5.1.15) does not support octal notation... | 732 | -- LuaPosix (as of 5.1.15) does not support octal notation... |
733 | if mode:sub(1,1) == "0" then | 733 | if mode:sub(1,1) == "0" then |
734 | local new_mode = {} | 734 | local new_mode = {} |
735 | for c in mode:sub(2):gmatch(".") do | 735 | for c in mode:sub(-3):gmatch(".") do |
736 | table.insert(new_mode, octal_to_rwx[c]) | 736 | table.insert(new_mode, octal_to_rwx[c]) |
737 | end | 737 | end |
738 | mode = table.concat(new_mode) | 738 | mode = table.concat(new_mode) |