aboutsummaryrefslogtreecommitdiffstats
path: root/util/pluginloader.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-05 20:58:37 +0200
committerKim Alvefur <zash@zash.se>2020-10-05 20:58:37 +0200
commit7f390f42dad75c3f4d1cee214ccded9b20e4552a (patch)
treeb5b6a0a5a5b83691cdf5c60cd2b1050a74c3ee5f /util/pluginloader.lua
parent1e7854e4b53be4a2abd550a265318d5bfbb4240e (diff)
downloadprosody-7f390f42dad75c3f4d1cee214ccded9b20e4552a.tar.gz
prosody-7f390f42dad75c3f4d1cee214ccded9b20e4552a.zip
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
Diffstat (limited to 'util/pluginloader.lua')
-rw-r--r--util/pluginloader.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/pluginloader.lua b/util/pluginloader.lua
index 5af5084d..8e37ffc4 100644
--- a/util/pluginloader.lua
+++ b/util/pluginloader.lua
@@ -60,6 +60,9 @@ end
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