Comparison

util/pluginloader.lua @ 6029:dd3d4cfbd3cb

util.pluginloader: Always use path separator from package.config (thanks Junne)
author Kim Alvefur <zash@zash.se>
date Sun, 09 Mar 2014 22:15:40 +0100
parent 5073:ecc89a60b2ba
child 6031:8796aa94c4b5
comparison
equal deleted inserted replaced
6026:8a8be471ec72 6029:dd3d4cfbd3cb
37 37
38 function load_resource(plugin, resource) 38 function load_resource(plugin, resource)
39 resource = resource or "mod_"..plugin..".lua"; 39 resource = resource or "mod_"..plugin..".lua";
40 40
41 local names = { 41 local names = {
42 "mod_"..plugin.."/"..plugin.."/"..resource; -- mod_hello/hello/mod_hello.lua 42 "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua
43 "mod_"..plugin.."/"..resource; -- mod_hello/mod_hello.lua 43 "mod_"..plugin..dir_sep..resource; -- mod_hello/mod_hello.lua
44 plugin.."/"..resource; -- hello/mod_hello.lua 44 plugin..dir_sep..resource; -- hello/mod_hello.lua
45 resource; -- mod_hello.lua 45 resource; -- mod_hello.lua
46 }; 46 };
47 47
48 return load_file(names); 48 return load_file(names);
49 end 49 end
50 50