From 80f200377d7ed85ae3f6a93348b386bb63b4aeed Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Sat, 24 Jan 2009 16:52:21 +0000 Subject: Started process of removing as many io.popen calls as possible. Not complete. git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1695 ab2d0c66-481e-0410-8bed-d214d4d58bed --- lib/menubuilder.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/menubuilder.lua') diff --git a/lib/menubuilder.lua b/lib/menubuilder.lua index 4105db6..5b9509b 100644 --- a/lib/menubuilder.lua +++ b/lib/menubuilder.lua @@ -8,15 +8,9 @@ module(..., package.seeall) require("format") -- returns a table of the "*.menu" tables --- uses the system "find" command -- startdir should be the app dir. local get_candidates = function (startdir) - local t = {} - local fh = io.popen('find ' .. format.escapespecialcharacters(startdir) .. ' -name "*.menu"') - for x in fh:lines() do - t[#t + 1] = x - end - return t + return fs.find_files_as_array(".*%.menu", startdir) end -- Split string into priority and name, convert '_' to space -- cgit v1.2.3