diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index f23e064cf1..71250be6d3 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -1717,10 +1717,7 @@ function interpreter:api_builtin_includes(...) files = os.files(subpath) else -- @see https://github.com/xmake-io/xmake/issues/6026 - local file = path.join(subpath, path.filename(curfile)) - if os.isfile(file) then - files = {file} - end + files = os.files(path.join(subpath, path.filename(curfile))) end if files and #files > 0 then table.join2(subpaths_matched, files)