aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2011-02-20 20:01:05 +0500
committerWaqas Hussain <waqas20@gmail.com>2011-02-20 20:01:05 +0500
commit715286ff8416f54f9a95a759b6b550d9a641d0e4 (patch)
treef069695028bd463c10469afc64e8918dc520e2e6 /util
parent1d46165b49103173069fd14c3b60b4d03bf9a5cf (diff)
downloadprosody-715286ff8416f54f9a95a759b6b550d9a641d0e4.tar.gz
prosody-715286ff8416f54f9a95a759b6b550d9a641d0e4.zip
util.pluginloader: Return full file path from internal file loader on success, not just the name.
Diffstat (limited to 'util')
-rw-r--r--util/pluginloader.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/pluginloader.lua b/util/pluginloader.lua
index 1aedd630..d9553537 100644
--- a/util/pluginloader.lua
+++ b/util/pluginloader.lua
@@ -20,15 +20,16 @@ local loadstring, pairs = loadstring, pairs;
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)