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