aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-12-02 09:22:39 -0200
committerPeter Melnichenko <mpeterval@gmail.com>2017-09-12 20:25:41 +0300
commit4b19e960871d512ffb733f016facda7cb35050d1 (patch)
tree9cf12de4fb2b07544bed6ab3c7e5570c19b4eaff
parent927b11f650e7b60fa92f37dd6d6ba663250f7bd9 (diff)
downloadluarocks-4b19e960871d512ffb733f016facda7cb35050d1.tar.gz
luarocks-4b19e960871d512ffb733f016facda7cb35050d1.tar.bz2
luarocks-4b19e960871d512ffb733f016facda7cb35050d1.zip
Fix clobbered varible.
-rw-r--r--src/luarocks/fs/lua.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua
index 0a95359a..90b51ce4 100644
--- a/src/luarocks/fs/lua.lua
+++ b/src/luarocks/fs/lua.lua
@@ -823,16 +823,16 @@ end
823function fs_lua.check_command_permissions(flags) 823function fs_lua.check_command_permissions(flags)
824 local ok = true 824 local ok = true
825 local err = "" 825 local err = ""
826 for _, dir in ipairs { cfg.rocks_dir, cfg.deploy_lua_dir, cfg.deploy_bin_dir, cfg.deploy_lua_dir } do 826 for _, directory in ipairs { cfg.rocks_dir, cfg.deploy_lua_dir, cfg.deploy_bin_dir, cfg.deploy_lua_dir } do
827 if fs.exists(dir) then 827 if fs.exists(directory) then
828 if not fs.is_writable(dir) then 828 if not fs.is_writable(directory) then
829 ok = false 829 ok = false
830 err = "Your user does not have write permissions in " .. dir 830 err = "Your user does not have write permissions in " .. directory
831 break 831 break
832 end 832 end
833 else 833 else
834 local root = fs.root_of(dir) 834 local root = fs.root_of(directory)
835 local parent = dir 835 local parent = directory
836 repeat 836 repeat
837 parent = dir.dir_name(parent) 837 parent = dir.dir_name(parent)
838 if parent == "" then 838 if parent == "" then
@@ -841,7 +841,7 @@ function fs_lua.check_command_permissions(flags)
841 until parent == root or fs.exists(parent) 841 until parent == root or fs.exists(parent)
842 if not fs.is_writable(parent) then 842 if not fs.is_writable(parent) then
843 ok = false 843 ok = false
844 err = dir.." does not exist and your user does not have write permissions in " .. parent 844 err = directory.." does not exist and your user does not have write permissions in " .. parent
845 break 845 break
846 end 846 end
847 end 847 end