diff options
-rw-r--r-- | src/luarocks/fs/win32/tools.lua | 8 |
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 |