# HG changeset patch # User Waqas Hussain # Date 1298214065 -18000 # Node ID 3c1b153c285631f52cf75f957a404675179ea3c6 # Parent 65f22ed19b9ee63419c2acccaea87e035b627ff2 util.pluginloader: Return full file path from internal file loader on success, not just the name. diff -r 65f22ed19b9e -r 3c1b153c2856 util/pluginloader.lua --- 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)