aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/fs/win32/tools.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/fs/win32/tools.lua b/src/luarocks/fs/win32/tools.lua
index f9468517..57e8c80e 100644
--- a/src/luarocks/fs/win32/tools.lua
+++ b/src/luarocks/fs/win32/tools.lua
@@ -239,7 +239,7 @@ function tools.set_permissions(filename, mode, scope)
239 return false, "Could not take ownership of the given file" 239 return false, "Could not take ownership of the given file"
240 end 240 end
241 -- Grant the current user the proper rights 241 -- Grant the current user the proper rights
242 ok = fs.execute_quiet(vars.ICACLS .. " " .. fs.Q(filename) .. " /inheritance:d /grant:r %USERNAME%:" .. perms) 242 ok = fs.execute_quiet(vars.ICACLS .. " " .. fs.Q(filename) .. " /inheritance:d /grant:r \"%USERNAME%\":" .. perms)
243 if not ok then 243 if not ok then
244 return false, "Failed setting permission " .. mode .. " for " .. scope 244 return false, "Failed setting permission " .. mode .. " for " .. scope
245 end 245 end
@@ -267,7 +267,7 @@ function tools.set_permissions(filename, mode, scope)
267 return false, "Failed setting permission " .. mode .. " for " .. scope 267 return false, "Failed setting permission " .. mode .. " for " .. scope
268 end 268 end
269 -- Grant permissions available only to the current user 269 -- Grant permissions available only to the current user
270 ok = fs.execute_quiet(vars.ICACLS .. " " .. fs.Q(filename) .. " /inheritance:d /grant %USERNAME%:" .. my_perms) 270 ok = fs.execute_quiet(vars.ICACLS .. " " .. fs.Q(filename) .. " /inheritance:d /grant \"%USERNAME%\":" .. my_perms)
271 if not ok then 271 if not ok then
272 return false, "Failed setting permission " .. mode .. " for " .. scope 272 return false, "Failed setting permission " .. mode .. " for " .. scope
273 end 273 end