summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-03-01 23:21:36 +0800
committerruki <[email protected]>2021-03-01 23:21:36 +0800
commit5aae64879a8c1ed79921a671453c27d3342ec2eb (patch)
tree5c047bafc8fbfdd027a074fc085d70978a894d92
parentd94ce2055a897dc28a273a0a898f6f9b96749e10 (diff)
fix os.files
-rw-r--r--xmake/plugins/project/vsxmake/render.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/plugins/project/vsxmake/render.lua b/xmake/plugins/project/vsxmake/render.lua
index eb39402af..99be35197 100644
--- a/xmake/plugins/project/vsxmake/render.lua
+++ b/xmake/plugins/project/vsxmake/render.lua
@@ -22,9 +22,9 @@ function _fill(opt, parmas)
return function(match)
local imp = match:match("^Import%((.+)%)$")
if imp then
- local func, overload = os.files(path.join(opt.templatedir, imp .. "(*)"))
- assert(overload == 1)
- func = func[1]
+ local funcs = os.files(path.join(opt.templatedir, imp .. "(*)"))
+ assert(#funcs == 1)
+ local func = funcs[1]
local args = path.filename(func):match("%((.+)%)$"):split(",")
return _render(func, opt, args)
end