util/pluginloader.lua
changeset 4149 3c1b153c2856
parent 4121 ea7e3f22f898
child 4150 2894ca33ec45
--- a/util/pluginloader.lua	Sun Feb 20 19:21:44 2011 +0500
+++ b/util/pluginloader.lua	Sun Feb 20 20:01:05 2011 +0500
@@ -20,15 +20,16 @@
 module "pluginloader"
 
 local function load_file(name)
-	local file, err;
+	local file, err, path;
 	for i=1,#plugin_dir do
-		file, err = io_open(plugin_dir[i]..name);
+		path = plugin_dir[i]..name;
+		file, err = io_open(path);
 		if file then break; end
 	end
 	if not file then return file, err; end
 	local content = file:read("*a");
 	file:close();
-	return content, name;
+	return content, path;
 end
 
 function load_resource(plugin, resource, loader)