diff options
| -rw-r--r-- | xmake/core/base/path.lua | 5 | ||||
| -rw-r--r-- | xmake/core/theme/theme.lua | 10 |
2 files changed, 6 insertions, 9 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua index e2fa9e1bc..ede2c36eb 100644 --- a/xmake/core/base/path.lua +++ b/xmake/core/base/path.lua @@ -70,11 +70,6 @@ end -- join path function path.join(p, ...) - print("p", p) - for _, name in ipairs({...}) do - print("1: ", name) - --p = p .. "/" .. name - end return path.translate(p .. path.sep() .. table.concat({...}, path.sep())) end diff --git a/xmake/core/theme/theme.lua b/xmake/core/theme/theme.lua index 60c01ce1c..6ab9c592b 100644 --- a/xmake/core/theme/theme.lua +++ b/xmake/core/theme/theme.lua @@ -115,10 +115,12 @@ function theme.load(name) -- find the theme script path local scriptpath = nil - for _, dir in ipairs(theme.directories()) do - scriptpath = path.join(dir, name, "xmake.lua") - if os.isfile(scriptpath) then - break + if name then + for _, dir in ipairs(theme.directories()) do + scriptpath = path.join(dir, name, "xmake.lua") + if os.isfile(scriptpath) then + break + end end end |
