Software /
code /
prosody
Comparison
util/pluginloader.lua @ 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 |
parent | 4149:3c1b153c2856 |
child | 4152:4d52812d018d |
comparison
equal
deleted
inserted
replaced
4149:3c1b153c2856 | 4150:2894ca33ec45 |
---|---|
60 end | 60 end |
61 | 61 |
62 function load_code(plugin, resource) | 62 function load_code(plugin, resource) |
63 local content, err = load_resource(plugin, resource); | 63 local content, err = load_resource(plugin, resource); |
64 if not content then return content, err; end | 64 if not content then return content, err; end |
65 return loadstring(content, "@"..err); | 65 local path = err; |
66 local f, err = loadstring(content, "@"..path); | |
67 if not f then return f, err; end | |
68 return f, path; | |
66 end | 69 end |
67 | 70 |
68 return _M; | 71 return _M; |