From d221d4df39bd614924515901f56ab2c7aa59dc2b Mon Sep 17 00:00:00 2001 From: George Roman <george.roman.99@gmail.com> Date: Sun, 16 Sep 2018 21:54:35 +0300 Subject: Remove unnecessary old check from fs.set_permissions --- src/luarocks/fs/win32/tools.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua index 7e0d10f4..744ba2d1 100644 --- a/src/luarocks/fs/win32/tools.lua +++ b/src/luarocks/fs/win32/tools.lua @@ -261,11 +261,9 @@ function tools.set_permissions(filename, mode, scope) end -- Finally, remove all the other users from the ACL in order to deny them access to the file for _, user in pairs(get_system_users()) do - if user ~= who then - local ok = fs.execute_quiet(fs.Q(vars.ICACLS) .. " " .. fs.Q(filename) .. " /remove " .. fs.Q(user)) - if not ok then - return false, "Failed setting permission " .. mode .. " for " .. scope - end + local ok = fs.execute_quiet(fs.Q(vars.ICACLS) .. " " .. fs.Q(filename) .. " /remove " .. fs.Q(user)) + if not ok then + return false, "Failed setting permission " .. mode .. " for " .. scope end end elseif scope == "all" then -- cgit v1.2.3-55-g6feb