diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-18 19:50:51 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2024-02-18 23:14:16 -0300 |
commit | 0ebba5ec21ed524235d95b37e0c5dfff4fd36e81 (patch) | |
tree | d18007801d1707bff97e13a30d3f3990c01450c7 | |
parent | d83b908a7371360d117cabbf6da099170f5fb178 (diff) | |
download | luarocks-0ebba5ec21ed524235d95b37e0c5dfff4fd36e81.tar.gz luarocks-0ebba5ec21ed524235d95b37e0c5dfff4fd36e81.tar.bz2 luarocks-0ebba5ec21ed524235d95b37e0c5dfff4fd36e81.zip |
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.
-rw-r--r-- | src/luarocks/fs/lua.lua | 8 |
1 files 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) | |||
373 | if not ok then | 373 | if not ok then |
374 | return false, err | 374 | return false, err |
375 | end | 375 | end |
376 | ok, err = fs.set_permissions(path, "exec", "all") | 376 | if cfg.is_platform("unix") then |
377 | if not ok then | 377 | ok, err = fs.set_permissions(path, "exec", "all") |
378 | return false, err | 378 | if not ok then |
379 | return false, err | ||
380 | end | ||
379 | end | 381 | end |
380 | elseif mode ~= "directory" then | 382 | elseif mode ~= "directory" then |
381 | return false, path.." is not a directory" | 383 | return false, path.." is not a directory" |