From d83d2400d5c28ec5d6655a930aaa4ec913e873ae Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 14 Feb 2026 20:15:07 +0800 Subject: fix builddir --- xmake/core/project/config.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xmake/core/project/config.lua b/xmake/core/project/config.lua index 93c1ff6af..47d9406a8 100644 --- a/xmake/core/project/config.lua +++ b/xmake/core/project/config.lua @@ -165,9 +165,13 @@ function config.builddir(opt) builddir = path.absolute(builddir, rootdir) end - -- adjust path for the current directory + -- Adjust path for the current directory, + -- If it's an external directory, use the absolute path directly. if not opt.absolute then - builddir = path.relative(builddir, os.curdir()) + local relativedir = path.relative(builddir, os.curdir()) + if not relativedir:startswith("..") then + builddir = relativedir + end end return builddir end -- cgit v1.3.1