From: Jo-Philipp Wich Date: Thu, 30 Jan 2020 11:19:27 +0000 (+0100) Subject: luci-base: dispatcher.lua: fix filesystem dependency checks X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=68784d4e614d5bca2fad3eebc1cf614178349ff1;p=oweals%2Fluci.git luci-base: dispatcher.lua: fix filesystem dependency checks A variable clash led to declarative `fs` dependencies being ineffective. Signed-off-by: Jo-Philipp Wich (cherry picked from commit 7cfce565530cbf6103275002ad20af57a509ad7b) --- diff --git a/modules/luci-base/luasrc/dispatcher.lua b/modules/luci-base/luasrc/dispatcher.lua index 32d34da01..72884b722 100644 --- a/modules/luci-base/luasrc/dispatcher.lua +++ b/modules/luci-base/luasrc/dispatcher.lua @@ -17,10 +17,10 @@ _M.fs = fs -- Index table local index = nil -local function check_fs_depends(fs) +local function check_fs_depends(spec) local fs = require "nixio.fs" - for path, kind in pairs(fs) do + for path, kind in pairs(spec) do if kind == "directory" then local empty = true for entry in (fs.dir(path) or function() end) do