# HG changeset patch # User Waqas Hussain # Date 1298214223 -18000 # Node ID 2894ca33ec45428106895520815660d761163886 # Parent 3c1b153c285631f52cf75f957a404675179ea3c6 util.pluginloader: Return file path on success in pluginloader.load_code(). diff -r 3c1b153c2856 -r 2894ca33ec45 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;