# HG changeset patch # User Waqas Hussain # Date 1298214065 -18000 # Node ID cd3fb3393e13150773ec67421c327d8f64cec23a # Parent aa07a381e5a69e679b9212764770894b60a9f288 util.pluginloader: Return full file path from internal file loader on success, not just the name. diff -r aa07a381e5a6 -r cd3fb3393e13 util/pluginloader.lua --- a/util/pluginloader.lua Sun Feb 20 19:16:56 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)