diff options
| author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2014-01-03 22:46:31 +0100 |
|---|---|---|
| committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2014-01-03 22:46:31 +0100 |
| commit | d269a3c3b7896cfe5a03bc0fed8c56d96d563be2 (patch) | |
| tree | a4ebb84137669719f6e5fe890f5807699c6d9807 /src | |
| parent | 5abe779e56af672a935d0fb9d4d83e85d853f3f8 (diff) | |
| download | luarocks-d269a3c3b7896cfe5a03bc0fed8c56d96d563be2.tar.gz luarocks-d269a3c3b7896cfe5a03bc0fed8c56d96d563be2.tar.bz2 luarocks-d269a3c3b7896cfe5a03bc0fed8c56d96d563be2.zip | |
Fix: Purge command did not check permission for the tree to operate on
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/purge.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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(...) | |||
| 44 | if not fs.is_dir(tree) then | 44 | if not fs.is_dir(tree) then |
| 45 | return nil, "Directory not found: "..tree | 45 | return nil, "Directory not found: "..tree |
| 46 | end | 46 | end |
| 47 | |||
| 48 | local ok, err = fs.check_command_permissions(flags) | ||
| 49 | if not ok then return nil, err, cfg.errorcodes.PERMISSIONDENIED end | ||
| 50 | |||
| 47 | search.manifest_search(results, path.rocks_dir(tree), query) | 51 | search.manifest_search(results, path.rocks_dir(tree), query) |
| 48 | 52 | ||
| 49 | local sort = function(a,b) return deps.compare_versions(b,a) end | 53 | local sort = function(a,b) return deps.compare_versions(b,a) end |
