diff options
| author | ruki <[email protected]> | 2026-02-14 20:15:07 +0800 |
|---|---|---|
| committer | Saikari <[email protected]> | 2026-02-20 16:31:35 +0300 |
| commit | 373932b3d1064f5968b286ae9d764d60b008edf6 (patch) | |
| tree | 08448e94f1d2f50d7d52e6907887d7565fd5534c | |
| parent | c05571007a70f58d2d5862c87e0125054d6f4e90 (diff) | |
fix builddir
| -rw-r--r-- | xmake/core/project/config.lua | 8 |
1 files 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 |
