diff options
author | Waqas Hussain <waqas20@gmail.com> | 2011-02-20 20:03:43 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2011-02-20 20:03:43 +0500 |
commit | 441316d853471fee1ee330b4f14950c32e4b4695 (patch) | |
tree | 0410daf86bca24389d1287bc53eff79753b7a081 /util | |
parent | 715286ff8416f54f9a95a759b6b550d9a641d0e4 (diff) | |
download | prosody-441316d853471fee1ee330b4f14950c32e4b4695.tar.gz prosody-441316d853471fee1ee330b4f14950c32e4b4695.zip |
util.pluginloader: Return file path on success in pluginloader.load_code().
Diffstat (limited to 'util')
-rw-r--r-- | util/pluginloader.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/pluginloader.lua b/util/pluginloader.lua index d9553537..9300b98a 100644 --- a/util/pluginloader.lua +++ b/util/pluginloader.lua @@ -62,7 +62,10 @@ end function load_code(plugin, resource) local content, err = load_resource(plugin, resource); if not content then return content, err; end - return loadstring(content, "@"..err); + local path = err; + local f, err = loadstring(content, "@"..path); + if not f then return f, err; end + return f, path; end return _M; |