Fixed common.path_suggest() for system.list_dir() changes
This commit is contained in:
parent
73e96c2641
commit
59881f81a6
|
@ -84,8 +84,7 @@ end
|
||||||
|
|
||||||
function common.path_suggest(text)
|
function common.path_suggest(text)
|
||||||
local path, name = text:match("^(.-)([^/\\]*)$")
|
local path, name = text:match("^(.-)([^/\\]*)$")
|
||||||
local ok, files = pcall(system.list_dir, path == "" and "." or path)
|
local files = system.list_dir(path == "" and "." or path) or {}
|
||||||
if not ok then return {} end
|
|
||||||
local res = {}
|
local res = {}
|
||||||
for _, file in ipairs(files) do
|
for _, file in ipairs(files) do
|
||||||
file = path .. file
|
file = path .. file
|
||||||
|
|
Loading…
Reference in New Issue