menubar.utils: Fix generator usage

:lines() generator in parse_dir function was not used properly which
caused problems when using LuaJIT.

Signed-off-by: Alexander Yakushev <yakushev.alex@gmail.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Alexander Yakushev 2012-04-07 12:01:33 +03:00 committed by Uli Schlachter
parent 6841999a47
commit 3ce52aaab2
1 changed files with 2 additions and 2 deletions

View File

@ -180,8 +180,8 @@ end
-- @return A table with all .desktop entries. -- @return A table with all .desktop entries.
function parse_dir(dir) function parse_dir(dir)
local programs = {} local programs = {}
local files = io.popen('find '.. dir ..' -maxdepth 1 -name "*.desktop"'):lines() local files = io.popen('find '.. dir ..' -maxdepth 1 -name "*.desktop"')
for file in files do for file in files:lines() do
table.insert(programs, parse(file)) table.insert(programs, parse(file))
end end
return programs return programs