diff options
author | Steven Barth <steven@midlink.org> | 2008-05-08 20:52:20 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-05-08 20:52:20 +0000 |
commit | f547a274f7c1ab03ad7463c227146b4683e9be27 (patch) | |
tree | 8d38a95d0cfcdb48a2820675eff534493f1bb99e /core/src/menu.lua | |
parent | 9a5184324c34fcccd728de910f6fa22b970c4374 (diff) |
* Minor bugfixes
Diffstat (limited to 'core/src/menu.lua')
-rw-r--r-- | core/src/menu.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/core/src/menu.lua b/core/src/menu.lua index 5724b2cb9e..d6f65116e4 100644 --- a/core/src/menu.lua +++ b/core/src/menu.lua @@ -30,7 +30,7 @@ require("ffluci.util") require("ffluci.sys") -- Default modelpath -modelpath = ffluci.sys.libpath() .. "/model/menu/" +modelpattern = ffluci.sys.libpath() .. "/model/menu/*.lua" -- Menu definition extra scope scope = { @@ -100,12 +100,11 @@ end function collect() local generators = {} - for k, menu in pairs(ffluci.fs.dir(modelpath)) do - if menu:sub(1, 1) ~= "." then - local f = loadfile(modelpath.."/"..menu) - if f then - table.insert(generators, f) - end + local m = ffluci.fs.glob(modelpattern) or {} + for k, menu in pairs(m) do + local f = loadfile(menu) + if f then + table.insert(generators, f) end end |