diff --git a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua index 4de2efaf..d8ffcafd 100644 --- a/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua +++ b/package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua @@ -134,7 +134,7 @@ end -- Safe glob: returns an empty table when the glob fails because of -- a non-existing path function M.glob(pattern) - return posix_glob.glob(pattern) or {} + return posix_glob.glob(pattern, 0) or {} end -- Generates a (hopefully) unique MAC address diff --git a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua index 2d727776..42dc47d1 100644 --- a/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua +++ b/package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua @@ -159,10 +159,10 @@ local function dispatch(config, http, request) ctl() end - for _, path in ipairs(glob.glob(base .. "*.lua") or {}) do + for _, path in ipairs(glob.glob(base .. "*.lua", 0) or {}) do load_ctl(path) end - for _, path in ipairs(glob.glob(base .. "*/*.lua") or {}) do + for _, path in ipairs(glob.glob(base .. "*/*.lua", 0) or {}) do load_ctl(path) end end