From 1db240f243f6263dc2f85b9a65c0f9615e3c7cf9 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 10 Jun 2020 11:43:05 -0400 Subject: Replaced `lfs.dir_foreach()` with `lfs.walk()` generator. --- core/file_io.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/file_io.lua') diff --git a/core/file_io.lua b/core/file_io.lua index f90c51ab..99157cb0 100644 --- a/core/file_io.lua +++ b/core/file_io.lua @@ -426,10 +426,10 @@ function io.quick_open(paths, filter, opts) assert_type(opts, 'table/nil', 3) local utf8_list = {} for i = 1, #paths do - lfs.dir_foreach(paths[i], function(filename) + for filename in lfs.walk(paths[i], filter or lfs.default_filter) do if #utf8_list >= io.quick_open_max then return false end utf8_list[#utf8_list + 1] = filename:iconv('UTF-8', _CHARSET) - end, filter or lfs.default_filter) + end end if #utf8_list >= io.quick_open_max then ui.dialogs.msgbox{ -- cgit v1.2.3