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)
This commit is contained in:
Takase
2025-05-18 22:55:28 +08:00
committed by takase1121
parent dec272d051
commit 0d9431857e
+1
View File
@@ -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