From b3f206263621162bd6f962e74a35165f86a2e453 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 28 Aug 2019 19:55:36 +0200 Subject: [PATCH] packages: fix missing argument to posix.glob --- package/gluon-core/luasrc/usr/lib/lua/gluon/util.lua | 2 +- package/gluon-web/luasrc/usr/lib/lua/gluon/web/dispatcher.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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