From d269a3c3b7896cfe5a03bc0fed8c56d96d563be2 Mon Sep 17 00:00:00 2001 From: Thijs Schreijer Date: Fri, 3 Jan 2014 22:46:31 +0100 Subject: Fix: Purge command did not check permission for the tree to operate on --- src/luarocks/purge.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/luarocks/purge.lua b/src/luarocks/purge.lua index 285c0f34..8c2164f9 100644 --- a/src/luarocks/purge.lua +++ b/src/luarocks/purge.lua @@ -44,6 +44,10 @@ function run(...) if not fs.is_dir(tree) then return nil, "Directory not found: "..tree end + + local ok, err = fs.check_command_permissions(flags) + if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end + search.manifest_search(results, path.rocks_dir(tree), query) local sort = function(a,b) return deps.compare_versions(b,a) end -- cgit v1.2.3-55-g6feb