Comparison

util/pluginloader.lua @ 4181:2f4496f46da2

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 4180:cd3fb3393e13
child 4152:4d52812d018d
comparison
equal deleted inserted replaced
4180:cd3fb3393e13 4181:2f4496f46da2
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;