Software /
code /
prosody
Changeset
4181:2f4496f46da2
util.pluginloader: Return file path on success in pluginloader.load_code().
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 20 Feb 2011 20:03:43 +0500 |
parents | 4180:cd3fb3393e13 |
children | 4182:f71e66702665 |
files | util/pluginloader.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/pluginloader.lua Sun Feb 20 20:01:05 2011 +0500 +++ b/util/pluginloader.lua Sun Feb 20 20:03:43 2011 +0500 @@ -62,7 +62,10 @@ 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;