# HG changeset patch # User Waqas Hussain # Date 1298214223 -18000 # Node ID 2f4496f46da244f73f3e4b7a32cb084a7a205c30 # Parent cd3fb3393e13150773ec67421c327d8f64cec23a util.pluginloader: Return file path on success in pluginloader.load_code(). diff -r cd3fb3393e13 -r 2f4496f46da2 util/pluginloader.lua --- 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;