summaryrefslogtreecommitdiff
path: root/xmake/core/base/path.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-03-09 23:26:49 +0800
committerruki <[email protected]>2022-03-09 23:26:49 +0800
commitfc5875cacc7b0e14edc43b12142d6f6f6fdd100c (patch)
treeca05a72278d86678666f8d75e0c94f580c4d0a79 /xmake/core/base/path.lua
parentfa2e4a9a5f21a8819beafb99a85652d83b7e5429 (diff)
improve path.join
Diffstat (limited to 'xmake/core/base/path.lua')
-rw-r--r--xmake/core/base/path.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua
index 712d8e604..ede2c36eb 100644
--- a/xmake/core/base/path.lua
+++ b/xmake/core/base/path.lua
@@ -70,10 +70,7 @@ end
-- join path
function path.join(p, ...)
- for _, name in ipairs({...}) do
- p = p .. "/" .. name
- end
- return path.translate(p)
+ return path.translate(p .. path.sep() .. table.concat({...}, path.sep()))
end
-- split path by the separator