diff options
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_path.lua | 3 |
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 |
