From a4355c6536364d25d2a500d1959c9a3b9e2bc247 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Tue, 16 Aug 2022 23:51:12 +0200 Subject: [PATCH] Add `PATHSEP` before listing the directory in `common.path_suggest` Before, in Windows, listing `.` instead of `.\` resulted in unexpected results. --- data/core/common.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/common.lua b/data/core/common.lua index 82927216..c7932455 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -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