aboutsummaryrefslogtreecommitdiff
path: root/core/ext/pm/modules_browser.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-01-25 21:09:41 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-01-25 21:09:41 -0500
commit2066415f82ba4fdda8d6f3020024d9fbf997e3da (patch)
tree4d7f591a9d02ac48ad024a2956f8f13ef26f6a1c /core/ext/pm/modules_browser.lua
parentf0dceb28f133d8392c8947155dc8582ec7737783 (diff)
downloadtextadept-2066415f82ba4fdda8d6f3020024d9fbf997e3da.tar.gz
textadept-2066415f82ba4fdda8d6f3020024d9fbf997e3da.zip
Replaced str:match with str:find where applicable for speed improvements.
Diffstat (limited to 'core/ext/pm/modules_browser.lua')
-rw-r--r--core/ext/pm/modules_browser.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/ext/pm/modules_browser.lua b/core/ext/pm/modules_browser.lua
index 757e7d93..5cf93d25 100644
--- a/core/ext/pm/modules_browser.lua
+++ b/core/ext/pm/modules_browser.lua
@@ -88,7 +88,7 @@ function get_contents_for(full_path)
local dir = {}
local dirpath = table.concat(full_path, '/')
for name in lfs.dir(dirpath) do
- if not name:match('^%.') then
+ if not name:find('^%.') then
dir[name] = { text = name }
if lfs.attributes(dirpath..'/'..name, 'mode') == 'directory' then
dir[name].parent = true
@@ -173,7 +173,7 @@ function perform_menu_action(menu_item, menu_id, selected_item)
}) == '1' then
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