From 0ebba5ec21ed524235d95b37e0c5dfff4fd36e81 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 18 Feb 2024 19:50:51 -0300 Subject: fix: do not attempt setting exec permissions for folders on Windows Not sure of what are the circumstances that make this cause problems on Windows, but running this shouldn't be necessary on Windows, since the concept of "execute permissions for directories means traversal permissions" is a Unixism. Fixes #991. --- src/luarocks/fs/lua.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index e9b4c5d8..ab32eff8 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua @@ -373,9 +373,11 @@ function fs_lua.make_dir(directory) if not ok then return false, err end - ok, err = fs.set_permissions(path, "exec", "all") - if not ok then - return false, err + if cfg.is_platform("unix") then + ok, err = fs.set_permissions(path, "exec", "all") + if not ok then + return false, err + end end elseif mode ~= "directory" then return false, path.." is not a directory" -- cgit v1.2.3-55-g6feb