Changeset

4150:2894ca33ec45

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 4149:3c1b153c2856
children 4151:a1ac8f064dcb
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;