From fc5875cacc7b0e14edc43b12142d6f6f6fdd100c Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 9 Mar 2022 23:26:49 +0800 Subject: improve path.join --- xmake/core/base/path.lua | 5 +---- 1 file changed, 1 insertion(+), 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 -- cgit v1.3.1