Software /
code /
prosody
Changeset
11131:40abef01f4b9
util.pluginloader: Look for module libs in mod_plugin/lib.lua
Luarocks can't be told to install something as foo.lib.lua AFAIK, so
instead let's try mod_bar/foo.lua
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 05 Oct 2020 20:58:37 +0200 |
parents | 11130:10485a3ef78b |
children | 11132:287d0d80aa57 |
files | util/pluginloader.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/util/pluginloader.lua Mon Oct 05 20:56:53 2020 +0200 +++ b/util/pluginloader.lua Mon Oct 05 20:58:37 2020 +0200 @@ -60,6 +60,9 @@ local function load_code_ext(plugin, resource, extension, env) local content, err = load_resource(plugin, resource.."."..extension); + if not content and extension == "lib.lua" then + content, err = load_resource(plugin, resource..".lua"); + end if not content then content, err = load_resource(resource, resource.."."..extension); if not content then