From 0d9431857e8745b76b850a1e83163606bafbe7d1 Mon Sep 17 00:00:00 2001 From: Takase <20792268+takase1121@users.noreply.github.com> Date: Sat, 15 Mar 2025 23:43:07 +0800 Subject: [PATCH] common: allow / and \ as PATHSEP on Windows when fuzzy matching files (#1992) * common: allow / and \ as PATHSEP on Windows when fuzzy matching files * common: fix PLATFORM == Windows (cherry picked from commit 5d6ae412e76e69181a3b46c79b8408fbd55183c9) --- data/core/common.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/data/core/common.lua b/data/core/common.lua index 1a89f23..3cee3ff 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -157,6 +157,7 @@ end local function fuzzy_match_items(items, needle, files) local res = {} + needle = (PLATFORM == "Windows" and files) and needle:gsub('/', PATHSEP) or needle for _, item in ipairs(items) do local score = system.fuzzy_match(tostring(item), needle, files) if score then