From 7f390f42dad75c3f4d1cee214ccded9b20e4552a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 5 Oct 2020 20:58:37 +0200 Subject: 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 --- util/pluginloader.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'util/pluginloader.lua') 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 -- cgit v1.2.3