diff options
| author | ruki <[email protected]> | 2022-03-09 23:36:23 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-03-09 23:36:23 +0800 |
| commit | 0aca668c37f645f7b8cdac44d3fb236c8f34196b (patch) | |
| tree | bb9a0ff68d1791cb2ff51fa66dbba1e87fd8fb44 | |
| parent | ee016abc9a742108965131770761e6623e16d85a (diff) | |
fix theme.load
| -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 |
