summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-01 23:13:20 +0800
committerruki <[email protected]>2022-07-01 23:13:20 +0800
commit690a5a3655ddb533234ae810f7916669f7c9f3ff (patch)
treee416278d76d05c048a17396b99a1ac0acd7ce52e
parent6766057844be6158cb96b712d8e3fe6512507682 (diff)
fix find_path for windows
-rw-r--r--xmake/core/sandbox/modules/import/lib/detect/find_path.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_path.lua b/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
index 26c60d025..d881d1072 100644
--- a/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
+++ b/xmake/core/sandbox/modules/import/lib/detect/find_path.lua
@@ -36,7 +36,8 @@ function sandbox_lib_detect_find_path._find(filedir, name)
if results and #results > 0 then
local filepath = results[1]
if filepath then
- local p = filepath:find(path.pattern(name))
+ -- we need translate name first, https://github.com/xmake-io/xmake-repo/issues/1315
+ local p = filepath:find(path.pattern(path.translate(name)))
if p then
filepath = path.translate(filepath:sub(1, p - 1))
if os.isdir(filepath) then