diff options
Diffstat (limited to 'lib/roles.lua')
-rw-r--r-- | lib/roles.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/roles.lua b/lib/roles.lua index 7c69724..8cc5332 100644 --- a/lib/roles.lua +++ b/lib/roles.lua @@ -52,7 +52,9 @@ get_controllers = function(self,pre,controller) filename = string.match(v,"[^/]*.lua") name = string.match(filename,"[^.]*") sname = string.match(filename,"[^-]*") - temp[prefix..sname] = {path=path,prefix=prefix,filename=filename,name=name,sname=sname} + if not temp[prefix..sname] then -- only keep the first of each + temp[prefix..sname] = {path=path,prefix=prefix,filename=filename,name=name,sname=sname} + end end if pre and controller then return temp[pre..controller] |