Comparison

util/pluginloader.lua @ 10434:8f709577fe8e

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 23 Nov 2019 23:12:01 +0100
parent 10205:ff8de86b75f0
child 11129:387d442497e7
comparison
equal deleted inserted replaced
10433:7777f25d5266 10434:8f709577fe8e
34 return file, err; 34 return file, err;
35 end 35 end
36 36
37 local function load_resource(plugin, resource) 37 local function load_resource(plugin, resource)
38 resource = resource or "mod_"..plugin..".lua"; 38 resource = resource or "mod_"..plugin..".lua";
39 39 local lua_version = _VERSION:match(" (.+)$");
40 local names = { 40 local names = {
41 "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua 41 "mod_"..plugin..dir_sep..plugin..dir_sep..resource; -- mod_hello/hello/mod_hello.lua
42 "mod_"..plugin..dir_sep..resource; -- mod_hello/mod_hello.lua 42 "mod_"..plugin..dir_sep..resource; -- mod_hello/mod_hello.lua
43 plugin..dir_sep..resource; -- hello/mod_hello.lua 43 plugin..dir_sep..resource; -- hello/mod_hello.lua
44 resource; -- mod_hello.lua 44 resource; -- mod_hello.lua
45 "share"..dir_sep.."lua"..dir_sep..lua_version..dir_sep.."mod_"..plugin..dir_sep..resource;
45 }; 46 };
46 47
47 return load_file(names); 48 return load_file(names);
48 end 49 end
49 50