aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Roman <george.roman.99@gmail.com>2018-09-16 21:54:35 +0300
committerHisham Muhammad <hisham@gobolinux.org>2018-09-16 23:39:22 -0700
commitd221d4df39bd614924515901f56ab2c7aa59dc2b (patch)
treed2d57f18f90f7d30343704a97c2ee6663cfbb3a1
parent78adde8148371ede3cd86793bd5da6d3ca354812 (diff)
downloadluarocks-d221d4df39bd614924515901f56ab2c7aa59dc2b.tar.gz
luarocks-d221d4df39bd614924515901f56ab2c7aa59dc2b.tar.bz2
luarocks-d221d4df39bd614924515901f56ab2c7aa59dc2b.zip
Remove unnecessary old check from fs.set_permissions
-rw-r--r--src/luarocks/fs/win32/tools.lua8
1 files 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)
261 end 261 end
262 -- Finally, remove all the other users from the ACL in order to deny them access to the file 262 -- Finally, remove all the other users from the ACL in order to deny them access to the file
263 for _, user in pairs(get_system_users()) do 263 for _, user in pairs(get_system_users()) do
264 if user ~= who then 264 local ok = fs.execute_quiet(fs.Q(vars.ICACLS) .. " " .. fs.Q(filename) .. " /remove " .. fs.Q(user))
265 local ok = fs.execute_quiet(fs.Q(vars.ICACLS) .. " " .. fs.Q(filename) .. " /remove " .. fs.Q(user)) 265 if not ok then
266 if not ok then 266 return false, "Failed setting permission " .. mode .. " for " .. scope
267 return false, "Failed setting permission " .. mode .. " for " .. scope
268 end
269 end 267 end
270 end 268 end
271 elseif scope == "all" then 269 elseif scope == "all" then