Software /
code /
prosody
Diff
util/pluginloader.lua @ 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 |
parent | 11130:10485a3ef78b |
child | 12250:e157e5c79daa |
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