diff --git a/CHANGELOG.md b/CHANGELOG.md index 577f59829..416455512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +## Fixed + +- Capture permission errors when searching for files on filesystem [PR #865](https://github.com/3scale/apicast/pull/865) + ## [3.3.0-beta1] - 2018-08-31 ### Added diff --git a/gateway/src/apicast/cli/filesystem.lua b/gateway/src/apicast/cli/filesystem.lua index e079fab7f..1dc81f244 100644 --- a/gateway/src/apicast/cli/filesystem.lua +++ b/gateway/src/apicast/cli/filesystem.lua @@ -13,6 +13,8 @@ local co_yield = coroutine.yield local co_create = coroutine.create local co_resume = coroutine.resume +local noop = function () end + --- Safely try to get directory iterator local function ldir(dir) local ok, iter, state = pcall(pl_path_dir, dir) @@ -20,7 +22,8 @@ local function ldir(dir) if ok then return iter, state else - return nil, iter + ngx.log(ngx.DEBUG, 'error listing directory: ', dir, ' err: ', iter) + return noop end end