mirror of
https://github.com/Reuh/candran.git
synced 2025-10-27 09:59:29 +00:00
Fix Candran loader
This commit is contained in:
parent
b00068c766
commit
d65c11e8d9
2 changed files with 11 additions and 11 deletions
|
|
@ -316,10 +316,10 @@ function candran.searcher(modpath)
|
|||
return "\n\tno candran file in package.path"
|
||||
end
|
||||
end
|
||||
return ()
|
||||
return (modpath) -- 2nd argument is not passed in Lua 5.1, so a closure is required
|
||||
local r, s = candran.loadfile(filepath)
|
||||
if r then
|
||||
return r()
|
||||
return r(modpath, filepath)
|
||||
else
|
||||
error("error loading candran module '%s' from file '%s':\n\t%s":format(modpath, filepath, s), 0)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue