From 441316d853471fee1ee330b4f14950c32e4b4695 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sun, 20 Feb 2011 20:03:43 +0500 Subject: util.pluginloader: Return file path on success in pluginloader.load_code(). --- util/pluginloader.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'util') 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; -- cgit v1.2.3