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:
parent
4b4c54ba65
commit
a4355c6536
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue