Add `PATHSEP` before listing the directory in `common.path_suggest`

Before, in Windows, listing `.` instead of `.\` resulted in unexpected 
results.
This commit is contained in:
Guldoman 2022-08-16 23:51:12 +02:00
parent 4b4c54ba65
commit a4355c6536
No known key found for this signature in database
GPG Key ID: EA928C8BDA1A8825
1 changed files with 1 additions and 1 deletions

View File

@ -164,10 +164,10 @@ function common.path_suggest(text, root)
end
end
local files = system.list_dir(path) or {}
if path:sub(-1) ~= PATHSEP then
path = path .. PATHSEP
end
local files = system.list_dir(path) or {}
local res = {}
for _, file in ipairs(files) do
file = path .. file