Fixed common.path_suggest() for system.list_dir() changes

This commit is contained in:
rxi 2020-04-21 23:45:34 +01:00
parent 73e96c2641
commit 59881f81a6
1 changed files with 1 additions and 2 deletions

View File

@ -84,8 +84,7 @@ end
function common.path_suggest(text)
local path, name = text:match("^(.-)([^/\\]*)$")
local ok, files = pcall(system.list_dir, path == "" and "." or path)
if not ok then return {} end
local files = system.list_dir(path == "" and "." or path) or {}
local res = {}
for _, file in ipairs(files) do
file = path .. file