From 2066415f82ba4fdda8d6f3020024d9fbf997e3da Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 25 Jan 2009 21:09:41 -0500 Subject: Replaced str:match with str:find where applicable for speed improvements. --- core/ext/pm/project_browser.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/ext/pm/project_browser.lua') diff --git a/core/ext/pm/project_browser.lua b/core/ext/pm/project_browser.lua index 0219839e..9a6c078a 100644 --- a/core/ext/pm/project_browser.lua +++ b/core/ext/pm/project_browser.lua @@ -52,7 +52,7 @@ function get_contents_for(full_path) else local dirpath = full_path[#full_path] for name in lfs.dir(dirpath) do - if not name:match('^%.') then -- ignore hidden files + if not name:find('^%.') then -- ignore hidden files local filepath = dirpath..'/'..name contents[filepath] = { text = name } if lfs.attributes(dirpath..'/'..name, 'mode') == 'directory' then @@ -322,7 +322,7 @@ function perform_menu_action(menu_item, menu_id, selected_item) else local function remove_directory(dirpath) for name in lfs.dir(dirpath) do - if not name:match('^%.%.?$') then os.remove(dirpath..'/'..name) end + if not name:find('^%.%.?$') then os.remove(dirpath..'/'..name) end end lfs.rmdir(dirpath) end -- cgit v1.2.3