diff options
author | Matthew Wild <mwild1@gmail.com> | 2016-02-01 21:26:15 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2016-02-01 21:26:15 +0000 |
commit | d0c5e1571fcd0d0242815c1076d56ecf917eec13 (patch) | |
tree | 4a2c3c9a40482459f4188df23e24ec989029b46c /core | |
parent | 684aa3187fc5d2a759bd98459d829cf3ed7f04df (diff) | |
download | prosody-d0c5e1571fcd0d0242815c1076d56ecf917eec13.tar.gz prosody-d0c5e1571fcd0d0242815c1076d56ecf917eec13.zip |
modulemanager, util.pluginloader: Move logic for locating some module libraries to pluginloader, to fix problems with non-filesystem errors being masked by the second load_code call
Diffstat (limited to 'core')
-rw-r--r-- | core/moduleapi.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 5817894f..c439ba6f 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -135,10 +135,7 @@ function api:wrap_global(event, handler) end function api:require(lib) - local f, n = pluginloader.load_code(self.name, lib..".lib.lua", self.environment); - if not f then - f, n = pluginloader.load_code(lib, lib..".lib.lua", self.environment); - end + local f, n = pluginloader.load_code_ext(self.name, lib, "lib.lua", self.environment); if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message return f(); end |